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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUG] COPY ... FROM STDIN hangs where supplied with too many more fields
Дата
Msg-id 21698.1021338556@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [BUG] COPY ... FROM STDIN hangs where supplied with too many more fields  (Jean-Luc Lachance <jllachan@nsd.ca>)
Список pgsql-bugs
Jean-Luc Lachance <jllachan@nsd.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: [BUG] COPY ... FROM STDIN hangs where supplied with too many more fields
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] Bug #659: lower()/upper() bug on