Just to clarify: I'm developing a tool to find bugs in Postgres, and
this is one of the findings, which could be the reason that some of
the statements might look unusual.
Best,
Manuel
On Wed, Jul 3, 2019 at 4:44 AM Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
>
> >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> Tom> (You realize of course that an index on a constant is pretty
> Tom> useless. I wonder if we should disallow that.)
>
> Unique index on a constant is a standard technique for forcing a table
> to be limited to at most one row (or with a partial index, at most one
> row matching a condition). Non-unique index on a constant is probably
> not useful though.
>
> --
> Andrew (irc:RhodiumToad)