Commit fb7355e0 authored by Itagaki Takahiro's avatar Itagaki Takahiro

Fix error messages for FreeFile in COPY command.

They are extracted from COPY API patch.

suggested by Noah Misch
parent ad762426
...@@ -1319,7 +1319,7 @@ DoCopyTo(CopyState cstate) ...@@ -1319,7 +1319,7 @@ DoCopyTo(CopyState cstate)
if (FreeFile(cstate->copy_file)) if (FreeFile(cstate->copy_file))
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not write to file \"%s\": %m", errmsg("could not close file \"%s\": %m",
cstate->filename))); cstate->filename)));
} }
} }
...@@ -2263,7 +2263,7 @@ CopyFrom(CopyState cstate) ...@@ -2263,7 +2263,7 @@ CopyFrom(CopyState cstate)
if (FreeFile(cstate->copy_file)) if (FreeFile(cstate->copy_file))
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not read from file \"%s\": %m", errmsg("could not close file \"%s\": %m",
cstate->filename))); cstate->filename)));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment