Thread

  1. [PATCH] fixup! allow indexes on partitioned tables to be unique

    Peter Eisentraut <peter_e@gmx.net> — 2018-02-14T03:53:55Z

    ---
     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 @@ <title>Description</title>
          <para>
           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 <literal>FOR VALUES
    -      </literal> or as a default partition by using
    -      <literal>DEFAULT</literal>.
    +      as a partition for specific values using <literal>FOR VALUES</literal>
    +      or as a default partition by using <literal>DEFAULT</literal>.
           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 @@ <title>Parameters</title>
          </para>
     
          <para>
    -      Partitioned tables do not support
    -      <literal>EXCLUDE</literal>, or
    +      Partitioned tables do not support <literal>EXCLUDE</literal> or
           <literal>FOREIGN KEY</literal> constraints; however, you can define
           these constraints on individual partitions.
          </para>
    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
    
    
    --------------96944975DB3E1576A2C456C3--