Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0PZU-005U7L-G5 for pgsql-docs@arkaria.postgresql.org; Tue, 07 Nov 2023 17:09:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r0PZR-00AQoH-Sm for pgsql-docs@arkaria.postgresql.org; Tue, 07 Nov 2023 17:08:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0PZR-00AQnp-L4 for pgsql-docs@lists.postgresql.org; Tue, 07 Nov 2023 17:08:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0PZP-005D3d-D0 for pgsql-docs@lists.postgresql.org; Tue, 07 Nov 2023 17:08:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3A7H8Xcu144517; Tue, 7 Nov 2023 12:08:33 -0500 From: Tom Lane To: "David G. Johnston" cc: m.matin.agh@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Example for Unique Partial Indexes In-reply-to: References: <169936161918.1769272.9365256195677055160@wrigleys.postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Tue, 07 Nov 2023 09:48:51 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <144515.1699376913.1@sss.pgh.pa.us> Date: Tue, 07 Nov 2023 12:08:33 -0500 Message-ID: <144516.1699376913@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Tue, Nov 7, 2023, 09:25 PG Doc comments form > wrote: >> Currently, the documentation does not provide information on how to create >> unique partial indexes. Unique partial indexes are valuable for enforcing >> uniqueness of a column's value over a subset of a table > 11.8 discusses this in detail including an example. Maybe should add a > forward reference from 11.6 though. Yeah, AFAICS 11.8's coverage of this point is perfectly adequate. I'm disinclined to add a forward reference, because 11.8 is the first section that mentions partial indexes at all. Somebody reading the chapter in order would have no idea what we were talking about. regards, tom lane