Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XPFNN-0004jp-Br for pgsql-docs@arkaria.postgresql.org; Wed, 03 Sep 2014 18:33:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XPFNM-00074D-Sf for pgsql-docs@arkaria.postgresql.org; Wed, 03 Sep 2014 18:33:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XPFNM-000741-7h for pgsql-docs@postgresql.org; Wed, 03 Sep 2014 18:33:48 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XPFNI-00088g-Ce for pgsql-docs@postgresql.org; Wed, 03 Sep 2014 18:33:46 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1XPFNF-0001YK-OL; Wed, 03 Sep 2014 14:33:41 -0400 Date: Wed, 3 Sep 2014 14:33:41 -0400 From: Bruce Momjian To: Robert Haas Cc: =?utf-8?B?VG9tw6HFoQ==?= Greif , pgsql-docs Subject: Re: Add link to partial unique index from Constraints (5.3) Message-ID: <20140903183341.GA13008@momjian.us> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -3.6 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Apr 30, 2014 at 10:18:22AM -0400, Robert Haas wrote: > On Wed, Apr 9, 2014 at 8:17 AM, Tomáš Greif > wrote: > > 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. > > I think adding something to that chapter would be good. Attached patch applied, and backpatched to 9.4. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + --NzB8fVQJ5HfG6fxh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="partial.diff" 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 **** Adding a unique constraint will automatically create a unique btree ! index on the column or group of columns used in the constraint. --- 546,554 ---- 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 partial index. --NzB8fVQJ5HfG6fxh Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --NzB8fVQJ5HfG6fxh--