summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/release-17.sgml8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/src/sgml/release-17.sgml b/doc/src/sgml/release-17.sgml
index dddc3229f94..57e3b8fcc01 100644
--- a/doc/src/sgml/release-17.sgml
+++ b/doc/src/sgml/release-17.sgml
@@ -3581,10 +3581,14 @@ FROM pg_catalog.pg_constraint c
WHERE contype = 'f' AND conparentid = 0 AND
(SELECT count(*) FROM pg_catalog.pg_constraint c2
WHERE c2.conparentid = c.oid) <>
- (SELECT count(*) FROM pg_catalog.pg_inherits i
+ ((SELECT count(*) FROM pg_catalog.pg_inherits i
WHERE (i.inhparent = c.conrelid OR i.inhparent = c.confrelid) AND
EXISTS (SELECT 1 FROM pg_catalog.pg_partitioned_table
- WHERE partrelid = i.inhparent));
+ WHERE partrelid = i.inhparent)) +
+ CASE WHEN pg_catalog.pg_partition_root(conrelid) = confrelid THEN
+ (SELECT count(*) FROM pg_catalog.pg_partition_tree(confrelid)
+ WHERE level = 1)
+ ELSE 0 END);
</programlisting>
Since it is possible that one or more of the <literal>ADD
CONSTRAINT</literal> steps will fail, you should save the query's