Re: pgsql: doc: add examples of creative use of unique expression indexes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: doc: add examples of creative use of unique expression indexes
Date: 2020-04-11 00:17:09
Message-ID: 20200411001709.GD24988@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-docs

On Fri, Apr 10, 2020 at 07:21:29PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)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);

I ended up using "true" since that is ony one byte; patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

Attachment Content-Type Size
index.diff text/x-diff 1.8 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2020-04-11 00:45:02 pgsql: Add contrib/amcheck debug message.
Previous Message Tom Lane 2020-04-10 23:21:29 Re: pgsql: doc: add examples of creative use of unique expression indexes

Browse pgsql-docs by date

  From Date Subject
Next Message Jürgen Purtz 2020-04-11 12:10:21 Re: Add A Glossary
Previous Message Tom Lane 2020-04-10 23:21:29 Re: pgsql: doc: add examples of creative use of unique expression indexes