Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 46EEC475EE4 for ; Tue, 5 Nov 2002 14:07:04 -0500 (EST) Received: from THOR.goeci.com (thor.goeci.com [66.28.220.99]) by postgresql.org (Postfix) with ESMTP id B5094475DA3 for ; Tue, 5 Nov 2002 14:07:03 -0500 (EST) Received: by THOR.goeci.com with Internet Mail Service (5.5.2653.19) id ; Tue, 5 Nov 2002 14:07:03 -0500 Message-ID: <2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com> From: Murthy Kambhampaty To: "'pgsql-admin@postgresql.org'" Subject: Bug in psql's "-R" option? Date: Tue, 5 Nov 2002 14:07:03 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/59 X-Sequence-Number: 6247 There seems to be a bug in psql's -R option (and the -P recordsep= ) version. I find that whereas the following succeeds: /usr/local/pgsql/bin/psql -U xxxx -d xxxx -h xxxx \ -P format=unaligned -P fieldsep='\t' -P tuples_only \ -c "select * from tab where yoo='hoo'" | /usr/local/pgsql/bin/psql -U xxxx -d xxxx -h xxxx \ -c "copy bar from stdin" adding -R '\n' or -P recordsep='\n' or -P recordsep=newline all give an error that the last field's data is too long for that field's format. Presently, this seems a bogus option, since the COPY command cannot handle any record separator except a newline, but the documentation for the "copy from" command states that '\n' will be parsed as a newline, so this seems a bug.