Fix error messages for FreeFile in COPY command.

They are extracted from COPY API patch.

suggested by Noah Misch
This commit is contained in:
Itagaki Takahiro 2011-02-07 10:46:56 +09:00
parent ad76242633
commit fb7355e0ce

View File

@ -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)));
}