Re: Proposed feature: Selective Foreign Keys

Gavin Wahl <gavinwahl@gmail.com>

From: Gavin Wahl <gavinwahl@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2013-12-20T03:29:18Z
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