From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: RI problem with inherited table |
Date: | 2000-12-22 17:52:15 |
Message-ID: | 14223.977507535@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> writes:
> It no longer seems to be possible to refer to a table, which is an
> ancestor of any other, in a referential integrity constraint.
> bray=# create table junk (id char(10) constraint junk_id_person references
> person(id));
> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
> CREATE
> bray=# insert into junk values ('aa');
> ERROR: SELECT FOR UPDATE is not supported for inherit queries
Hm. The short-term answer seems to be to modify the queries generated
by the RI triggers to say "ONLY foo". I am not sure whether we
understand the semantics involved in allowing a REFERENCES target to be
taken as an inheritance tree rather than just one table, but certainly
the current implementation won't handle that correctly.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-12-22 19:00:34 | Inheritance is a security loophole! |
Previous Message | Oliver Elphick | 2000-12-22 17:20:19 | RI problem with inherited table |