pgsql: Remove incomplete/incorrect support for zero-column foreign keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove incomplete/incorrect support for zero-column foreign keys
Date: 2012-06-21 00:15:50
Message-ID: E1ShV3u-00077B-JH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove incomplete/incorrect support for zero-column foreign keys.

The original coding in ri_triggers.c had partial support for the concept of
zero-column foreign key constraints. But this is not defined in the SQL
standard, nor was it ever allowed by any other part of Postgres, nor was it
very fully implemented even here (eg there was no support for preventing
PK-table deletions that would violate the constraint). Doesn't seem very
useful to carry 100-plus lines of code for a corner case that no one is
interested in making work. Instead, just add a check that the column list
read from pg_constraint is non-empty.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dfd9c116cc3ebaf42f895b9b16a9ff69bb21664b

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 154 ++---------------------------------
1 files changed, 7 insertions(+), 147 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-06-21 12:30:37 pgsql: Add a small cache of locks owned by a resource owner in Resource
Previous Message Tom Lane 2012-06-20 23:48:14 pgsql: Increase MAX_SYSCACHE_CALLBACKS from 20 to 32.