Commit 6d59a218 authored by Tom Lane's avatar Tom Lane

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 57c081de; 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.)
parent 8bdd6f56
...@@ -443,7 +443,7 @@ bool check_for_data_types_usage(ClusterInfo *cluster, ...@@ -443,7 +443,7 @@ bool check_for_data_types_usage(ClusterInfo *cluster,
const char *base_query, const char *base_query,
const char *output_path); const char *output_path);
bool check_for_data_type_usage(ClusterInfo *cluster, bool check_for_data_type_usage(ClusterInfo *cluster,
const char *typename, const char *type_name,
const char *output_path); const char *output_path);
void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster, void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster,
bool check_mode); bool check_mode);
......
...@@ -233,20 +233,20 @@ check_for_data_types_usage(ClusterInfo *cluster, ...@@ -233,20 +233,20 @@ check_for_data_types_usage(ClusterInfo *cluster,
* *
* If so, write a report to the given file name, and return true. * 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 * trivial wrapper around check_for_data_types_usage() to convert a
* type name into a base query. * type name into a base query.
*/ */
bool bool
check_for_data_type_usage(ClusterInfo *cluster, check_for_data_type_usage(ClusterInfo *cluster,
const char *typename, const char *type_name,
const char *output_path) const char *output_path)
{ {
bool found; bool found;
char *base_query; char *base_query;
base_query = psprintf("SELECT '%s'::pg_catalog.regtype AS oid", base_query = psprintf("SELECT '%s'::pg_catalog.regtype AS oid",
typename); type_name);
found = check_for_data_types_usage(cluster, base_query, output_path); found = check_for_data_types_usage(cluster, base_query, output_path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment