Обсуждение: pgsql: Remove incomplete/incorrect support for zero-column foreign keys

Поиск
Список
Период
Сортировка

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

От
Tom Lane
Дата:
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(-)