Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group