From: Tom Lane Date: Thu, 15 Apr 2010 21:05:23 +0000 (+0000) Subject: Fix psql's \copy to not insert spaces around dots and commas in the text of X-Git-Tag: REL8_2_17~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06464ef972612c96f7e00dbc33325b97f7c39551;p=thirdparty%2Fpostgresql.git Fix psql's \copy to not insert spaces around dots and commas in the text of the SELECT query in \copy (SELECT ...) commands. This is unnecessary and breaks numeric literals, as seen in bug #5411 from Vitalii Tymchyshyn. This change has already been made in passing in HEAD; backpatch to 8.2 through 8.4 (earlier releases don't have COPY (SELECT ...) at all). --- diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index d77d99ad4ce..e610899a61b 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/copy.c,v 1.71.2.2 2009/08/07 20:16:29 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/psql/copy.c,v 1.71.2.3 2010/04/15 21:05:23 tgl Exp $ */ #include "postgres_fe.h" #include "copy.h" @@ -152,7 +152,7 @@ parse_slash_copy(const char *args) while (parens > 0) { - token = strtokx(NULL, whitespace, ".,()", "\"'", + token = strtokx(NULL, whitespace, "()", "\"'", nonstd_backslash, true, false, pset.encoding); if (!token) goto error;