Allow some exclusion constraints on partitions
authorPeter Eisentraut <[email protected]>
Wed, 12 Jul 2023 07:24:43 +0000 (09:24 +0200)
committerPeter Eisentraut <[email protected]>
Wed, 12 Jul 2023 07:25:17 +0000 (09:25 +0200)
commit8c852ba9a4347c4778cc610ad5a9cb50ea701b5c
tree800a18a3d154c45608f2952e28e9367191b0f5e4
parentce0b0fa3e792cefc3ce325b10af224edbbf68ce7
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 <[email protected]>
Reviewed-by: Ronan Dunklau <[email protected]>
Reviewed-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/ec8b1d9b-502e-d1f8-e909-1bf9dffe6fa5@illuminatedcomputing.com
13 files changed:
contrib/btree_gist/Makefile
contrib/btree_gist/expected/partitions.out [new file with mode: 0644]
contrib/btree_gist/meson.build
contrib/btree_gist/sql/partitions.sql [new file with mode: 0644]
doc/src/sgml/ddl.sgml
src/backend/commands/indexcmds.c
src/backend/parser/parse_utilcmd.c
src/test/regress/expected/alter_table.out
src/test/regress/expected/create_table.out
src/test/regress/expected/indexing.out
src/test/regress/sql/alter_table.sql
src/test/regress/sql/create_table.sql
src/test/regress/sql/indexing.sql