aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-03-10 11:29:54 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-03-10 11:31:01 +0100
commitb83e8a2ca2eb381ea0a48e5b2d4e4cdb74febc45 (patch)
tree096c48da1fa64b967936099217dfebecace76fc7 /src/backend
parente033696596566d422a0eae47adca371a210ed730 (diff)
downloadpostgresql-b83e8a2ca2eb381ea0a48e5b2d4e4cdb74febc45.tar.gz
postgresql-b83e8a2ca2eb381ea0a48e5b2d4e4cdb74febc45.zip
Remove support for temporal RESTRICT foreign keys
It isn't clear how these should behave, so let's wait to implement them until we are sure how to do it. This feature was initially added by commit 89f908a6d0a, so it hasn't been released yet. Author: Paul A. Jungwirth <pj@illuminatedcomputing.com> Discussion: https://postgr.es/m/e773bc11-4ac1-40de-bb91-814e02f05b6d%40eisentraut.org
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/commands/tablecmds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 59156a1c1f6..1f870982559 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -10052,7 +10052,8 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
*/
if (fkconstraint->fk_with_period)
{
- if (fkconstraint->fk_upd_action == FKCONSTR_ACTION_CASCADE ||
+ if (fkconstraint->fk_upd_action == FKCONSTR_ACTION_RESTRICT ||
+ fkconstraint->fk_upd_action == FKCONSTR_ACTION_CASCADE ||
fkconstraint->fk_upd_action == FKCONSTR_ACTION_SETNULL ||
fkconstraint->fk_upd_action == FKCONSTR_ACTION_SETDEFAULT)
ereport(ERROR,
@@ -10060,7 +10061,8 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
errmsg("unsupported %s action for foreign key constraint using PERIOD",
"ON UPDATE"));
- if (fkconstraint->fk_del_action == FKCONSTR_ACTION_CASCADE ||
+ if (fkconstraint->fk_del_action == FKCONSTR_ACTION_RESTRICT ||
+ fkconstraint->fk_del_action == FKCONSTR_ACTION_CASCADE ||
fkconstraint->fk_del_action == FKCONSTR_ACTION_SETNULL ||
fkconstraint->fk_del_action == FKCONSTR_ACTION_SETDEFAULT)
ereport(ERROR,