From: | BARTKO, Zoltán <bartko(dot)zoltan(at)pobox(dot)sk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | foreign key problems |
Date: | 2005-01-04 12:15:40 |
Message-ID: | 200501041215.j04CFe7s017600@www7.pobox.sk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Dear all,
I have a problem:
if I create the tables that are in the attached file, I can't insert
rows into the AAttachment table, even though the rows in DObject with
the given primary key exist (PgSQL 8.0 rc1 complains about
(ownerid)=(insert the number here) not available in DObject. The same
happens with attribute bodyid).
I have noticed that this behavior is different, if I do not use
inherited tables, e.g. if I use
create table A (
a integer references B(b),
b integer references B(b));
create table B
(b serial primary key);
insert into B values (1);
insert into B values (2);
insert into A (a,b) values (1,2);
works flawlessly.
Is this a feature or a bug or is the problem in front of the computer?
thanks
Zoltan
____________________________________
RAMMSTEIN, 22.02.2005 o 20,00, Bratislava Incheba,
Info: 0904 666 363, http://www.xl.sk
Attachment | Content-Type | Size |
---|---|---|
tables.txt | text/plain | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2005-01-04 14:56:22 | Re: foreign key problems |
Previous Message | Edmund Bacon | 2005-01-03 23:02:30 | Re: Formatting an Interval |