Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb7355e

Browse files
committed
Fix error messages for FreeFile in COPY command.
They are extracted from COPY API patch. suggested by Noah Misch
1 parent ad76242 commit fb7355e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/commands/copy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ DoCopyTo(CopyState cstate)
13191319
if (FreeFile(cstate->copy_file))
13201320
ereport(ERROR,
13211321
(errcode_for_file_access(),
1322-
errmsg("could not write to file \"%s\": %m",
1322+
errmsg("could not close file \"%s\": %m",
13231323
cstate->filename)));
13241324
}
13251325
}
@@ -2263,7 +2263,7 @@ CopyFrom(CopyState cstate)
22632263
if (FreeFile(cstate->copy_file))
22642264
ereport(ERROR,
22652265
(errcode_for_file_access(),
2266-
errmsg("could not read from file \"%s\": %m",
2266+
errmsg("could not close file \"%s\": %m",
22672267
cstate->filename)));
22682268
}
22692269

0 commit comments

Comments
 (0)