Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d8a5608

Browse files
committed
psql: fix \copy stdin trailing space requirement
Previously a trailing space was required for \copy ... stdin: copy foo from stdin ; Etsuro Fujita
1 parent 601f480 commit d8a5608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/copy.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ parse_slash_copy(const char *args)
196196
goto error;
197197

198198
/* { 'filename' | PROGRAM 'command' | STDIN | STDOUT | PSTDIN | PSTDOUT } */
199-
token = strtokx(NULL, whitespace, NULL, "'",
199+
token = strtokx(NULL, whitespace, ";", "'",
200200
0, false, false, pset.encoding);
201201
if (!token)
202202
goto error;
@@ -205,7 +205,7 @@ parse_slash_copy(const char *args)
205205
{
206206
int toklen;
207207

208-
token = strtokx(NULL, whitespace, NULL, "'",
208+
token = strtokx(NULL, whitespace, ";", "'",
209209
0, false, false, pset.encoding);
210210
if (!token)
211211
goto error;

0 commit comments

Comments
 (0)