diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-07-12 09:24:43 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-07-12 09:25:17 +0200 |
commit | 8c852ba9a4347c4778cc610ad5a9cb50ea701b5c (patch) | |
tree | 800a18a3d154c45608f2952e28e9367191b0f5e4 /src/backend/parser/parse_utilcmd.c | |
parent | ce0b0fa3e792cefc3ce325b10af224edbbf68ce7 (diff) | |
download | postgresql-8c852ba9a4347c4778cc610ad5a9cb50ea701b5c.tar.gz postgresql-8c852ba9a4347c4778cc610ad5a9cb50ea701b5c.zip |
Allow some exclusion constraints on partitions
Previously we only allowed unique B-tree constraints on partitions
(and only if the constraint included all the partition keys). But we
could allow exclusion constraints with the same restriction. We also
require that those columns be compared for equality, not something
like &&.
Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: Ronan Dunklau <ronan.dunklau@aiven.io>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/ec8b1d9b-502e-d1f8-e909-1bf9dffe6fa5@illuminatedcomputing.com
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index d67580fc77a..e48e9e99d36 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -900,12 +900,6 @@ transformTableConstraint(CreateStmtContext *cxt, Constraint *constraint) errmsg("exclusion constraints are not supported on foreign tables"), parser_errposition(cxt->pstate, constraint->location))); - if (cxt->ispartitioned) - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("exclusion constraints are not supported on partitioned tables"), - parser_errposition(cxt->pstate, - constraint->location))); cxt->ixconstraints = lappend(cxt->ixconstraints, constraint); break; |