Re: COPY seems to work, but no data in the table

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: COPY seems to work, but no data in the table
Дата
Msg-id 3D34F0A6.3070303@joeconway.com
обсуждение исходный текст
Ответ на Re: COPY seems to work, but no data in the table  (nconway@klamath.dyndns.org (Neil Conway))
Список pgsql-general
Tom Lane wrote:
 > ERROR:  $1 referential integrity violation - key referenced from bar
 > not found in foo
 > lost synchronization with server, resetting connection
 > regression=#
 >
 > I believe it works the same way in 7.2.1, but don't have an
 > exactly-7.2.1-release code tree handy to check.  (This is a post-7.2
 > bug fix though, 7.2 will fail :-()

I do:

test=# select version();
                            version
-------------------------------------------------------------
  PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

test=# create table foo(f1 int primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
'foo_pkey' for table 'foo'
CREATE
test=# create table bar(f2 int references foo);
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
CREATE
test=# copy bar from stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
 >> 1
 >> \.
ERROR:  <unnamed> referential integrity violation - key referenced from
bar not found in foo
lost synchronization with server, resetting connection

Same result.

Joe



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

Предыдущее
От: "Tracy Gong"
Дата:
Сообщение: ? about Installation of Postgresql
Следующее
От: "Phil Geer"
Дата:
Сообщение: Re: Logging SQL queries?