Re: SELECT results in "ERROR: index key does not match expected index column"

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: SELECT results in "ERROR: index key does not match expected index column"
Date: 2019-07-03 02:44:08
Message-ID: 87tvc3q1ob.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-07-03 03:04:47 BUG #15887: An extra "break" instruction causes a bug
Previous Message Peter Geoghegan 2019-07-03 00:06:43 Re: SELECT results in "ERROR: index key does not match expected index column"