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

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: missive(at)hotmail(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: COPY seems to work, but no data in the table
Date: 2002-07-17 04:20:54
Message-ID: 3D34F0A6.3070303@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2002-07-17 04:26:48 Re: ? about Installation of Postgresql
Previous Message Tracy Gong 2002-07-17 04:17:29 ? about Installation of Postgresql