From 9a94e9ae7ea2f0aced00a53ab618ee4f7c46cc5e Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 11 Jan 2024 14:27:10 +0100 Subject: [PATCH] Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shihao zhong, Shubham Khanna, Ashutosh Bapat Backpatch-through: 12 Discussion: https://postgr.es/m/167299368731.659.16130012959616771853@wrigleys.postgresql.org --- doc/src/sgml/ddl.sgml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 3f643a53846..0e9ab2f19e1 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -4150,7 +4150,9 @@ ALTER INDEX measurement_city_id_logdate_key Using ONLY to add or drop a constraint on only the partitioned table is supported as long as there are no partitions. Once partitions exist, using ONLY - will result in an error. Instead, constraints on the partitions + will result in an error for any constraints other than + UNIQUE and PRIMARY KEY. + Instead, constraints on the partitions themselves can be added and (if they are not present in the parent table) dropped.