psql: fix \copy stdin trailing space requirement

Previously a trailing space was required for \copy ... stdin:

	copy foo from stdin ;

Etsuro Fujita
This commit is contained in:
Bruce Momjian 2013-09-10 19:36:10 -04:00
parent 601f48076f
commit d8a5608d4a
1 changed files with 2 additions and 2 deletions

View File

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