pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: doc: add examples of creative use of unique expression indexes
Date: Fri, 10 Apr 2020 19:21:29 -0400
Message-ID: <13031.1586560889@sss.pgh.pa.us> (raw)
In-Reply-To: <20200410214821.GC24988@momjian.us>
References: <E1ikvbp-0005jW-E9@gemulon.postgresql.org>
	<2304.1586532634@sss.pgh.pa.us>
	<20200410214821.GC24988@momjian.us>

Bruce Momjian <bruce@momjian.us> writes:
> I agree with your analysis.  I still want to have some mention that
> partial indexes can be used to create single-NULL columns, which might
> be required for compatibility with other databases.  Attached is an
> updated patch which removes the previous commit but adds a mention of
> this.

The single-null thing is probably a useful example, but please make
it an actual separate example, or at least its own para outside the
existing <example> sections.

Also, the existing example demonstrating that seems overcomplicated;
why not just

    create unique index ... (1) where (foo is null);

			regards, tom lane





view thread (15+ messages)  latest in thread

Message-ID: <13031.1586560889@sss.pgh.pa.us>
Permalink:  ../13031.1586560889@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13031.1586560889@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: doc: add examples of creative use of unique expression indexes
  In-Reply-To: <13031.1586560889@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox