Commit d8a5608d authored by Bruce Momjian's avatar Bruce Momjian

psql: fix \copy stdin trailing space requirement

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

	copy foo from stdin ;

Etsuro Fujita
parent 601f4807
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment