Re: RI problem with inherited table
| От | Tom Lane |
|---|---|
| Тема | Re: RI problem with inherited table |
| Дата | |
| Msg-id | 14223.977507535@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | RI problem with inherited table ("Oliver Elphick" <olly@lfix.co.uk>) |
| Список | pgsql-hackers |
"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
В списке pgsql-hackers по дате отправления: