diff options
author | Peter Eisentraut | 2023-07-12 07:24:43 +0000 |
---|---|---|
committer | Peter Eisentraut | 2023-07-12 07:25:17 +0000 |
commit | 8c852ba9a4347c4778cc610ad5a9cb50ea701b5c (patch) | |
tree | 800a18a3d154c45608f2952e28e9367191b0f5e4 /doc/src | |
parent | ce0b0fa3e792cefc3ce325b10af224edbbf68ce7 (diff) |
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 'doc/src')
-rw-r--r-- | doc/src/sgml/ddl.sgml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 43179959658..58aaa691c6a 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -4216,11 +4216,13 @@ ALTER INDEX measurement_city_id_logdate_key <listitem> <para> - There is no way to create an exclusion constraint spanning the - whole partitioned table. It is only possible to put such a - constraint on each leaf partition individually. Again, this - limitation stems from not being able to enforce cross-partition - restrictions. + Similarly an exclusion constraint must include all the + partition key columns. Furthermore the constraint must compare those + columns for equality (not e.g. <literal>&&</literal>). + Again, this limitation stems from not being able to enforce + cross-partition restrictions. The constraint may include additional + columns that aren't part of the partition key, and it may compare + those with any operators you like. </para> </listitem> |