Re: SELECT results in "ERROR: index key does not match expected index column" - Mailing list pgsql-bugs

From Manuel Rigger
Subject Re: SELECT results in "ERROR: index key does not match expected index column"
Date
Msg-id CA+u7OA7DpQVO9+0kLT5jUxyZfQPcSXRJbrGu5jVeu0MR0YE8Cg@mail.gmail.com
Whole thread Raw
In response to Re: SELECT results in "ERROR: index key does not match expected index column"  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-bugs
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)



pgsql-bugs by date:

Previous
From: Manuel Rigger
Date:
Subject: DISCARD TEMP results in "ERROR: cache lookup failed for type 0"
Next
From: Manuel Rigger
Date:
Subject: Re: VACUUM FULL results in deadlock