aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-05-20 13:03:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-05-20 13:03:08 -0400
commit6d59a218c38adf5b993200a804713df4982a0c75 (patch)
tree9f03df750a00f6fdb7b1720a9d418726b5c287d2 /src
parent8bdd6f563aa2456de602e78991e6a9f61b8ec86d (diff)
downloadpostgresql-6d59a218c38adf5b993200a804713df4982a0c75.tar.gz
postgresql-6d59a218c38adf5b993200a804713df4982a0c75.zip
Clean up cpluspluscheck violation.
"typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. Oversight in 57c081de0; back-patch as that was. (The policy requiring pg_upgrade.h to pass cpluspluscheck only goes back to v12, but it seems best to keep this code looking the same in all branches.)
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.h2
-rw-r--r--src/bin/pg_upgrade/version.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index a5f71c5294f..f7eb2349e66 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -443,7 +443,7 @@ bool check_for_data_types_usage(ClusterInfo *cluster,
const char *base_query,
const char *output_path);
bool check_for_data_type_usage(ClusterInfo *cluster,
- const char *typename,
+ const char *type_name,
const char *output_path);
void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster,
bool check_mode);
diff --git a/src/bin/pg_upgrade/version.c b/src/bin/pg_upgrade/version.c
index b531bda3e5c..a3c193316d0 100644
--- a/src/bin/pg_upgrade/version.c
+++ b/src/bin/pg_upgrade/version.c
@@ -233,20 +233,20 @@ check_for_data_types_usage(ClusterInfo *cluster,
*
* If so, write a report to the given file name, and return true.
*
- * typename should be a fully qualified type name. This is just a
+ * type_name should be a fully qualified type name. This is just a
* trivial wrapper around check_for_data_types_usage() to convert a
* type name into a base query.
*/
bool
check_for_data_type_usage(ClusterInfo *cluster,
- const char *typename,
+ const char *type_name,
const char *output_path)
{
bool found;
char *base_query;
base_query = psprintf("SELECT '%s'::pg_catalog.regtype AS oid",
- typename);
+ type_name);
found = check_for_data_types_usage(cluster, base_query, output_path);