Subject: Add link to partial unique index from Constraints (5.3)

From: Tomáš Greif <[email-masked]>
Date: Wed, 9 Apr 2014 14:17:34 +0200

Hi,

would it be good idea to add new paragraph 5.3.7 to chapter 5.3
(Constraints) with at least information that there is something like
partial unique index and link to chapter 11.8 (Partial Indexes)?

Partial index can be used to enforce uniqueness in a way other constraints
cannot provide. Currently, it not easy to find this type of constraint as
not a lot of people would read through documentation on indexes when
looking for constraints.

Regards,

Tomas

---

From: Robert Haas <[email-masked]>
Date: Wed, 30 Apr 2014 10:18:22 -0400

On Wed, Apr 9, 2014 at 8:17 AM, Tomáš Greif
<[email-masked]> wrote:
> (Constraints) with at least information that there is something like partial
> unique index and link to chapter 11.8 (Partial Indexes)?
>
> not a lot of people would read through documentation on indexes when looking
> for constraints.

I think adding something to that chapter would be good.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-docs mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

---

From: Bruce Momjian <[email-masked]>
Date: Wed, 3 Sep 2014 14:33:41 -0400

> I think adding something to that chapter would be good.

Attached patch applied, and backpatched to 9.4.

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
new file mode 100644
index 0fcd9f8..c07f5a2
*** a/doc/src/sgml/ddl.sgml
--- b/doc/src/sgml/ddl.sgml
*************** CREATE TABLE products (
*** 546,552 ****
  
     <para>
      Adding a unique constraint will automatically create a unique btree
!     index on the column or group of columns used in the constraint.
     </para>
  
     <indexterm>
--- 546,554 ----
  
     <para>
      Adding a unique constraint will automatically create a unique btree
!     index on the column or group of columns used in the constraint. 
!     A uniqueness constraint on only some rows can be enforced by creating
!     a <link linkend="indexes-partial">partial index</link>.
     </para>
  
     <indexterm>