diff options
author | Bruce Momjian <bruce@momjian.us> | 2015-11-24 17:18:28 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2015-11-24 17:18:28 -0500 |
commit | b17dbf26293e3805b5f7ab5a11a8e3f984c476ad (patch) | |
tree | b1d7fa99b703ec08185f35cdaab83b9394e60378 /src/bin/pg_upgrade/function.c | |
parent | b542d940c308d35446e86c2bb273823303afb25c (diff) | |
download | postgresql-b17dbf26293e3805b5f7ab5a11a8e3f984c476ad.tar.gz postgresql-b17dbf26293e3805b5f7ab5a11a8e3f984c476ad.zip |
pg_upgrade: fix CopyFile() on Windows to fail on file existence
Also fix getErrorText() to return the right error string on failure.
This behavior now matches that of other operating systems.
Report by Noah Misch
Backpatch through 9.1
Diffstat (limited to 'src/bin/pg_upgrade/function.c')
-rw-r--r-- | src/bin/pg_upgrade/function.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_upgrade/function.c b/src/bin/pg_upgrade/function.c index 04492a5cee4..0fb8c31104b 100644 --- a/src/bin/pg_upgrade/function.c +++ b/src/bin/pg_upgrade/function.c @@ -214,7 +214,7 @@ check_loadable_libraries(void) if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL) pg_fatal("Could not open file \"%s\": %s\n", - output_path, getErrorText(errno)); + output_path, getErrorText()); fprintf(script, "Could not load library \"%s\"\n%s\n", lib, PQerrorMessage(conn)); |