Re: pgsql: doc: add examples of creative use of unique expression indexes - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: doc: add examples of creative use of unique expression indexes
Date
Msg-id 13031.1586560889@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: doc: add examples of creative use of unique expressionindexes  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pgsql: doc: add examples of creative use of unique expressionindexes  (Bruce Momjian <bruce@momjian.us>)
List pgsql-committers
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



pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgsql: doc: add examples of creative use of unique expressionindexes
Next
From: Bruce Momjian
Date:
Subject: Re: pgsql: doc: add examples of creative use of unique expressionindexes