From 69fbe467e554f6f70195d0f40898eba62ddb9641 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 13 Feb 2018 22:53:55 -0500 Subject: [PATCH] fixup! allow indexes on partitioned tables to be unique --- doc/src/sgml/ref/alter_table.sgml | 5 ++--- doc/src/sgml/ref/create_table.sgml | 3 +-- src/backend/catalog/index.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 2d3b6d3960..5be56d4b28 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -839,9 +839,8 @@ Description This form attaches an existing table (which might itself be partitioned) as a partition of the target table. The table can be attached - as a partition for specific values using FOR VALUES - or as a default partition by using - DEFAULT. + as a partition for specific values using FOR VALUES + or as a default partition by using DEFAULT. For each index in the target table, a corresponding one will be created in the attached table; or, if an equivalent index already exists, will be attached to the target table's index, diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 83d3472da2..b7bf7bc1c8 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -546,8 +546,7 @@ Parameters - Partitioned tables do not support - EXCLUDE, or + Partitioned tables do not support EXCLUDE or FOREIGN KEY constraints; however, you can define these constraints on individual partitions. diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index a5fa3540a7..5fb50a3a0e 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -1325,7 +1325,7 @@ index_constraint_create(Relation heapRelation, */ if (OidIsValid(parentConstraintId)) { - ObjectAddress third; + ObjectAddress third; // ??? ObjectAddressSet(third, ConstraintRelationId, parentConstraintId); recordDependencyOn(&referenced, &third, DEPENDENCY_INTERNAL_AUTO); -- 2.16.1