From db9f287711ac49d9799f93f664d6d101ff8f5891 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 11 Nov 2021 10:49:44 +0100 Subject: [PATCH] doc: Add referential actions to CREATE/ALTER TABLE synopsis The general constraint synopsis references "referential_action", but this was not further defined in the synopsis section. Compared to the level of detail that the synopsis gives to other subclauses, this should surely be there. extracted from a patch by Paul Martinez Discussion: https://www.postgresql.org/message-id/flat/CACqFVBZQyMYJV=njbSMxf+rbDHpx=W=B7AEaMKn8dWn9OZJY7w@mail.gmail.com --- doc/src/sgml/ref/alter_table.sgml | 4 ++++ doc/src/sgml/ref/create_table.sgml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 2d639a66af..bc5dcba59c 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -135,6 +135,10 @@ WITH ( MODULUS numeric_literal, REM exclude_element in an EXCLUDE constraint is: { column_name | ( expression ) } [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] + +referential_action in a FOREIGN KEY/REFERENCES constraint is: + +{ NO ACTION | RESTRICT | CASCADE | SET NULL | SET DEFAULT } diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 61a584fa34..57d51a676a 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -105,6 +105,10 @@ WITH ( MODULUS numeric_literal, REM exclude_element in an EXCLUDE constraint is: { column_name | ( expression ) } [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] + +referential_action in a FOREIGN KEY/REFERENCES constraint is: + +{ NO ACTION | RESTRICT | CASCADE | SET NULL | SET DEFAULT }