Re: Proposed feature: Selective Foreign Keys

Lists: pgsql-hackers
From: Gavin Wahl <gavinwahl(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposed feature: Selective Foreign Keys
Date: 2013-12-20 03:29:18
Message-ID: CACPudh1HQ8=jQL9wD8O_gFJa3gPcp07-V_Ni44xD_DQ_=FL=mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

This a great solution to this problem, one I've found to be very common in
web development. The technique will work to add RI to Django's generic
foreign keys[1], which are implemented with an id column and a type-flag
column.

[1]:
https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#generic-relations