aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/check.c')
-rw-r--r--src/bin/pg_upgrade/check.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c
index ed41dee6a54..42bf4992a08 100644
--- a/src/bin/pg_upgrade/check.c
+++ b/src/bin/pg_upgrade/check.c
@@ -431,8 +431,8 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
SCRIPT_PREFIX, SCRIPT_EXT);
if ((script = fopen_priv(*analyze_script_file_name, "w")) == NULL)
- pg_fatal("Could not open file \"%s\": %s\n",
- *analyze_script_file_name, getErrorText());
+ pg_fatal("could not open file \"%s\": %s\n",
+ *analyze_script_file_name, strerror(errno));
#ifndef WIN32
/* add shebang header */
@@ -486,8 +486,8 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
#ifndef WIN32
if (chmod(*analyze_script_file_name, S_IRWXU) != 0)
- pg_fatal("Could not add execute permission to file \"%s\": %s\n",
- *analyze_script_file_name, getErrorText());
+ pg_fatal("could not add execute permission to file \"%s\": %s\n",
+ *analyze_script_file_name, strerror(errno));
#endif
termPQExpBuffer(&user_specification);
@@ -559,8 +559,8 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
prep_status("Creating script to delete old cluster");
if ((script = fopen_priv(*deletion_script_file_name, "w")) == NULL)
- pg_fatal("Could not open file \"%s\": %s\n",
- *deletion_script_file_name, getErrorText());
+ pg_fatal("could not open file \"%s\": %s\n",
+ *deletion_script_file_name, strerror(errno));
#ifndef WIN32
/* add shebang header */
@@ -615,8 +615,8 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
#ifndef WIN32
if (chmod(*deletion_script_file_name, S_IRWXU) != 0)
- pg_fatal("Could not add execute permission to file \"%s\": %s\n",
- *deletion_script_file_name, getErrorText());
+ pg_fatal("could not add execute permission to file \"%s\": %s\n",
+ *deletion_script_file_name, strerror(errno));
#endif
check_ok();
@@ -819,8 +819,8 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
{
found = true;
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
- pg_fatal("Could not open file \"%s\": %s\n",
- output_path, getErrorText());
+ pg_fatal("could not open file \"%s\": %s\n",
+ output_path, strerror(errno));
if (!db_used)
{
fprintf(script, "Database: %s\n", active_db->db_name);
@@ -922,8 +922,8 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
{
found = true;
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
- pg_fatal("Could not open file \"%s\": %s\n",
- output_path, getErrorText());
+ pg_fatal("could not open file \"%s\": %s\n",
+ output_path, strerror(errno));
if (!db_used)
{
fprintf(script, "Database: %s\n", active_db->db_name);
@@ -1013,8 +1013,8 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster)
{
found = true;
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
- pg_fatal("Could not open file \"%s\": %s\n",
- output_path, getErrorText());
+ pg_fatal("could not open file \"%s\": %s\n",
+ output_path, strerror(errno));
if (!db_used)
{
fprintf(script, "Database: %s\n", active_db->db_name);
@@ -1089,8 +1089,8 @@ get_bin_version(ClusterInfo *cluster)
if ((output = popen(cmd, "r")) == NULL ||
fgets(cmd_output, sizeof(cmd_output), output) == NULL)
- pg_fatal("Could not get pg_ctl version data using %s: %s\n",
- cmd, getErrorText());
+ pg_fatal("could not get pg_ctl version data using %s: %s\n",
+ cmd, strerror(errno));
pclose(output);