pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Murthy Kambhampaty <murthy.kambhampaty@goeci.com>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Bug in psql's "-R" option?
Date: Tue, 5 Nov 2002 14:07:03 -0500
Message-ID: <2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com> (raw)

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.



view thread (3+ messages)  latest in thread

Message-ID: <2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com>
Permalink:  ../2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com/
Also on:    postgresql.org/message-id/2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: murthy.kambhampaty@goeci.com
  Subject: Re: Bug in psql's "-R" option?
  In-Reply-To: <2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com>
  References: <2D92FEBFD3BE1346A6C397223A8DD3FC09206B@THOR.goeci.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox