postgres.git / summary / log / commit / refs
commit fb7355e0cedfadd437c30c73cfb71af7ff8933b1
Author: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Date: Mon Feb 07 01:46:56 2011 +0000
First released in: 9.1.0
Fix error messages for FreeFile in COPY command.
They are extracted from COPY API patch.
suggested by Noah Misch
src/backend/commands/copy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 841bf220c76..3350ca0b6ef 100644
--- a/src/backend/commands/copy.c
+++ b/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)));
}
[parent: ad762426333a]