From: Bruce Momjian Date: Tue, 10 Sep 2013 23:36:10 +0000 (-0400) Subject: psql: fix \copy stdin trailing space requirement X-Git-Tag: REL9_4_BETA1~1154 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8a5608d4ac9d4b74772980666cc6626bd18c3ff;p=thirdparty%2Fpostgresql.git psql: fix \copy stdin trailing space requirement Previously a trailing space was required for \copy ... stdin: copy foo from stdin ; Etsuro Fujita --- diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index c1e7cfeb8af..13123d600db 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -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;