Fix error messages for FreeFile in COPY command.

They are extracted from COPY API patch.

suggested by Noah Misch
pull/1/head
Itagaki Takahiro 15 years ago
parent ad76242633
commit fb7355e0ce
  1. 4
      src/backend/commands/copy.c

@ -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…
Cancel
Save