Allow UNIQUE indexes on partitioned tables
Alvaro Herrera <alvherre@alvh.no-ip.org>
Allow UNIQUE indexes on partitioned tables If we restrict unique constraints on partitioned tables so that they must always include the partition key, then our standard approach to unique indexes already works --- each unique key is forced to exist within a single partition, so enforcing the unique restriction in each index individually is enough to have it enforced globally. Therefore we can implement unique indexes on partitions by simply removing a few restrictions (and adding others.) Discussion: https://postgr.es/m/20171222212921.hi6hg6pem2w2t36z@alvherre.pgsql Discussion: https://postgr.es/m/20171229230607.3iib6b62fn3uaf47@alvherre.pgsql Reviewed-by: Simon Riggs, Jesper Pedersen, Peter Eisentraut, Jaime Casanova, Amit Langote
Files
Documentation touched
Discussion
- Unique indexes & constraints on partitioned tables 4 messages · 2017-12-22 → 2017-12-27
- unique indexes on partitioned tables 21 messages · 2017-12-29 → 2018-03-13