aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-03-05 11:15:06 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-03-05 11:24:17 +0100
commit030e10ff1a365796bd4bcbbc5b6a8552f7efc765 (patch)
tree2067363cf2b9941323fa0dd7e7e0fb0720957813 /src/backend/commands
parent55cdba2647ed6bbe1126c6b6d8f53e8602ec05a1 (diff)
downloadpostgresql-030e10ff1a365796bd4bcbbc5b6a8552f7efc765.tar.gz
postgresql-030e10ff1a365796bd4bcbbc5b6a8552f7efc765.zip
Rename pg_constraint.conwithoutoverlaps to conperiod
pg_constraint.conwithoutoverlaps was recently added to support primary keys and unique constraints with the WITHOUT OVERLAPS clause. An upcoming patch provides the foreign-key side of this functionality, but the syntax there is different and uses the keyword PERIOD. It would make sense to use the same pg_constraint field for both of these, but then we should pick a more general name that conveys "this constraint has a temporal/period-related feature". conperiod works for that and is nicely compact. Changing this now avoids possibly having to introduce versioning into clients. Note there are still some "without overlaps" variables left, which deal specifically with the parsing of the primary key/unique constraint feature. Author: Paul A. Jungwirth <pj@illuminatedcomputing.com> Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/tablecmds.c6
-rw-r--r--src/backend/commands/trigger.c2
-rw-r--r--src/backend/commands/typecmds.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 764478c950c..c61f9305c2e 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -10378,7 +10378,7 @@ addFkRecurseReferenced(List **wqueue, Constraint *fkconstraint, Relation rel,
conislocal, /* islocal */
coninhcount, /* inhcount */
connoinherit, /* conNoInherit */
- false, /* conWithoutOverlaps */
+ false, /* conPeriod */
false); /* is_internal */
ObjectAddressSet(address, ConstraintRelationId, constrOid);
@@ -10677,7 +10677,7 @@ addFkRecurseReferencing(List **wqueue, Constraint *fkconstraint, Relation rel,
false,
1,
false,
- false, /* conWithoutOverlaps */
+ false, /* conPeriod */
false);
/*
@@ -11183,7 +11183,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
false, /* islocal */
1, /* inhcount */
false, /* conNoInherit */
- false, /* conWithoutOverlaps */
+ false, /* conPeriod */
true);
/* Set up partition dependencies for the new constraint */
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 3d35b64a57d..35eb7180f7e 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -834,7 +834,7 @@ CreateTriggerFiringOn(CreateTrigStmt *stmt, const char *queryString,
true, /* islocal */
0, /* inhcount */
true, /* noinherit */
- false, /* conwithoutoverlaps */
+ false, /* conperiod */
isInternal); /* is_internal */
}
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index d3b6c1089e7..f4cdec3bf2f 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -3544,7 +3544,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
true, /* is local */
0, /* inhcount */
false, /* connoinherit */
- false, /* conwithoutoverlaps */
+ false, /* conperiod */
false); /* is_internal */
if (constrAddr)
ObjectAddressSet(*constrAddr, ConstraintRelationId, ccoid);