Re: [BUG] COPY ... FROM STDIN hangs where supplied with too many more fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUG] COPY ... FROM STDIN hangs where supplied with too many more fields
Date: 2002-05-14 01:09:16
Message-ID: 21698.1021338556@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jean-Luc Lachance <jllachan(at)nsd(dot)ca> writes:
> psql -c "COPY table FROM STDIN DELIMITERS ':'" < data.txt
> hangs without warning when supplied with more field than the actual
> table.

Oh?

$ psql regression
...
regression=# create table tab (f1 int,f2 int);
CREATE
regression=# \q
$ cat data.txt
1:2:3
4:5:6
$ psql -c "COPY tab FROM STDIN DELIMITERS ':'" regression <data.txt
NOTICE: copy: line 1, CopyReadNewline: extra fields ignored
NOTICE: copy: line 2, CopyReadNewline: extra fields ignored
$ psql regression
...
regression=# select * from tab;
f1 | f2
----+----
1 | 2
4 | 5
(2 rows)

regression=#

Looks fine from here ...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tatsuo Ishii 2002-05-14 01:29:54 Re: [HACKERS] Bug #659: lower()/upper() bug on
Previous Message Jean-Luc Lachance 2002-05-13 19:53:03 [BUG] COPY ... FROM STDIN hangs where supplied with too many more fields