Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut2023-07-12 07:24:43 +0000
committerPeter Eisentraut2023-07-12 07:25:17 +0000
commit8c852ba9a4347c4778cc610ad5a9cb50ea701b5c (patch)
tree800a18a3d154c45608f2952e28e9367191b0f5e4 /doc/src
parentce0b0fa3e792cefc3ce325b10af224edbbf68ce7 (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.sgml12
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>&amp;&amp;</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>