From: | Michael Adler <adler(at)glimpser(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | |
Date: | 2002-04-05 22:00:01 |
Message-ID: | Pine.NEB.4.44.0204051639530.6232-100000@reva.sixgirls.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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)
ICS=# \d item_attrib_a
Table "item_attrib_a"
Attribute | Type | Modifier
---------------+--------------------------+-------------------------------------------
last_modified | timestamp with time zone | not null default "timestamp"('now'::text)
id | bigint |
value | text |
ICS=# \d object
Table "object"
Attribute | Type | Modifier
-----------+--------+--------------------------------------------------------------------------------------
-------------------------------------------------------------
id | bigint | not null default (float8(nextval('object_id_seq'::text)) + (float8(CASE WHEN (getpara
masint('user_location'::text) NOTNULL) THEN getparamasint('u
Index: object_id_key
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.
I'd appreciate any suggestions.
Mike Adler
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2002-04-05 22:34:50 | Re: |
Previous Message | Konstantinos Agouros | 2002-04-05 21:52:10 | INET contains question |