Re: FK's to refer to rows in inheritance child
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>, "w.p.dijkstra@mgrid.net" <w.p.dijkstra@mgrid.net>
Date: 2010-12-01T15:05:50Z
Lists: pgsql-hackers
Yeb Havinga <yebhavinga@gmail.com> writes: > On 2010-12-01 15:27, Tom Lane wrote: >> Indeed. This isn't even worth the time to review, unless you have a >> proposal for fixing the unique-index-across-multiple-tables problem. > That was in the part that you chose to not quote. Perhaps I should have said "possibly workable proposal". What you wrote doesn't even begin to cover the interesting part of the problem, namely how to ensure uniqueness is preserved in the face of concurrent insertions. (My current feelings about this are that a general-purpose solution would probably cost more than it's worth. What people really care about is FK to a partitioned table, which is a structure in which we don't have to solve the general problem: if we know that the partitioning prevents the same key from appearing in multiple partitions, then we only have to look into one partition. So this is just another item that's pending introduction of real partitioning infrastructure.) regards, tom lane