1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

doc: Reword restriction on partition keys in unique indexes

New wording from David G. Johnston, who noticed the unreadable original
also.  Include his suggested test case as well.

Fix a typo I noticed elsewhere while doing this.

Discussion: https://postgr.es/m/CAKFQuwY4Ld7ecxL_KAmaxwt0FUu5VcPPN2L4dh+3BeYbrdBa5g@mail.gmail.com
This commit is contained in:
Alvaro Herrera
2018-03-12 13:28:52 -03:00
parent 3beb46ae81
commit 63cbee6a78
5 changed files with 21 additions and 7 deletions

View File

@ -791,11 +791,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
</para>
<para>
When used on partitioned tables, unique constraints must include all the
columns of the partition key.
If any partitions are in turn partitioned, all columns of each partition
key are considered at each level below the <literal>UNIQUE</literal>
constraint.
When establishing a unique constraint for a multi-level partition
hierarchy, all the columns in the partition key of the target
partitioned table, as well as those of all its descendant partitioned
tables, must be included in the constraint definition.
</para>
</listitem>
</varlistentry>