"Oliver Elphick" <olly@lfix.co.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