On 11/28/2013 09:15 AM, Tom Dunstan wrote:
> Feature Proposal: Selective foreign keys.
> -------------------------------------------------
> Allow foreign keys to have where clauses.
I haven't caught up on the discussion yet, but: if you can swing this,
it'd also be very useful for RLS, providing a remotely sane way to
handle foreign key constraints in data models where the RLS constraint
is the same on all tables and doesn't get changed (e.g. multi-tenant).
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services