|
|
|
@ -184,7 +184,7 @@ pg_file_write_internal(text *file, text *data, bool replace) |
|
|
|
|
|
|
|
|
|
|
|
if (stat(filename, &fst) >= 0) |
|
|
|
if (stat(filename, &fst) >= 0) |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(ERRCODE_DUPLICATE_FILE, |
|
|
|
(errcode(ERRCODE_DUPLICATE_FILE), |
|
|
|
errmsg("file \"%s\" exists", filename))); |
|
|
|
errmsg("file \"%s\" exists", filename))); |
|
|
|
|
|
|
|
|
|
|
|
f = AllocateFile(filename, "wb"); |
|
|
|
f = AllocateFile(filename, "wb"); |
|
|
|
@ -340,7 +340,7 @@ pg_file_rename_internal(text *file1, text *file2, text *file3) |
|
|
|
if (rc >= 0 || errno != ENOENT) |
|
|
|
if (rc >= 0 || errno != ENOENT) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(ERRCODE_DUPLICATE_FILE, |
|
|
|
(errcode(ERRCODE_DUPLICATE_FILE), |
|
|
|
errmsg("cannot rename to target file \"%s\"", |
|
|
|
errmsg("cannot rename to target file \"%s\"", |
|
|
|
fn3 ? fn3 : fn2))); |
|
|
|
fn3 ? fn3 : fn2))); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -371,7 +371,7 @@ pg_file_rename_internal(text *file1, text *file2, text *file3) |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(ERRCODE_UNDEFINED_FILE, |
|
|
|
(errcode(ERRCODE_UNDEFINED_FILE), |
|
|
|
errmsg("renaming \"%s\" to \"%s\" was reverted", |
|
|
|
errmsg("renaming \"%s\" to \"%s\" was reverted", |
|
|
|
fn2, fn3))); |
|
|
|
fn2, fn3))); |
|
|
|
} |
|
|
|
} |
|
|
|
|