mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
Fix error messages for FreeFile in COPY command.
They are extracted from COPY API patch. suggested by Noah Misch
This commit is contained in:
parent
ad76242633
commit
fb7355e0ce
@ -1319,7 +1319,7 @@ DoCopyTo(CopyState cstate)
|
||||
if (FreeFile(cstate->copy_file))
|
||||
ereport(ERROR,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not write to file \"%s\": %m",
|
||||
errmsg("could not close file \"%s\": %m",
|
||||
cstate->filename)));
|
||||
}
|
||||
}
|
||||
@ -2263,7 +2263,7 @@ CopyFrom(CopyState cstate)
|
||||
if (FreeFile(cstate->copy_file))
|
||||
ereport(ERROR,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not read from file \"%s\": %m",
|
||||
errmsg("could not close file \"%s\": %m",
|
||||
cstate->filename)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user