From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Michael Adler <adler(at)glimpser(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: |
Date: | 2002-04-05 22:34:50 |
Message-ID: | 20020405143231.B33623-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 5 Apr 2002, Michael Adler wrote:
>
> I get a "referential integrity violation", but the referenced key *does*
> exist in the referenced table.
>
> ICS=#
> ICS=# insert into item_attrib_a (id,value) values ('10000000014','yes');
> ERROR: <unnamed> referential integrity violation - key referenced from item_attrib_a not found in object
> ICS=# select * from object where id = '10000000014';
> id
> -------------
> 10000000014
> (1 row)
[snipped]
> I created the table "item_attrib_a" like so:
>
> CREATE TABLE item_attrib_a (
> id int8 references object (id) on delete cascade,
> value TEXT
> ) inherits (last_modified);
>
> I don't think that it's important, but the table "object" is inherited by
> other tables.
In fact it may certainly be... References constraints do not inherit
to children currently. The constraint selects from only the named table
(do a select * from ONLY object where id=...) and I'd guess that the row
is actually in one of the children.
From | Date | Subject | |
---|---|---|---|
Next Message | Denis Chavez | 2002-04-05 23:04:33 | Row locking inside a rule, is it possible? |
Previous Message | Michael Adler | 2002-04-05 22:00:01 |