diff options
Diffstat (limited to 'contrib/pg_upgrade/check.c')
-rw-r--r-- | contrib/pg_upgrade/check.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c index 464bbe2604f..936306ce618 100644 --- a/contrib/pg_upgrade/check.c +++ b/contrib/pg_upgrade/check.c @@ -458,10 +458,9 @@ create_script_for_cluster_analyze(char **analyze_script_file_name) prep_status("Creating script to analyze new cluster"); if (os_info.user_specified) - pg_asprintf(&user_specification, "-U \"%s\" ", os_info.user); + user_specification = psprintf("-U \"%s\" ", os_info.user); - pg_asprintf(analyze_script_file_name, "analyze_new_cluster.%s", - SCRIPT_EXT); + *analyze_script_file_name = psprintf("analyze_new_cluster.%s", SCRIPT_EXT); if ((script = fopen_priv(*analyze_script_file_name, "w")) == NULL) pg_fatal("Could not open file \"%s\": %s\n", @@ -592,8 +591,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name) int tblnum; char old_cluster_pgdata[MAXPGPATH]; - pg_asprintf(deletion_script_file_name, "delete_old_cluster.%s", - SCRIPT_EXT); + *deletion_script_file_name = psprintf("delete_old_cluster.%s", SCRIPT_EXT); /* * Some users (oddly) create tablespaces inside the cluster data |