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

From Peter Geoghegan
Subject Re: SELECT results in "ERROR: index key does not match expected index column"
Date
Msg-id CAH2-WzmzRVSpPM8wKXxfreZOuLWjhaW35M9wrFun31-+TohmQw@mail.gmail.com
Whole thread Raw
In response to Re: SELECT results in "ERROR: index key does not match expected index column"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, Jul 2, 2019 at 4:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > I think it should cause an error, most likely an unintentional
> > implementation mistake -- so the sooner it is flagged the better to
> > remedy it!
>
> On reflection that might be overkill.  I've heard of people using
> unique indexes on constants to constrain tables to one row, and
> you can make interesting refinements by making the index partial.

I think it's overkill. As you pointed out not too long ago, there are
several ways to define an index that probably or definitely results in
a useless index. There is no reason to draw the line here, or
anywhere.

-- 
Peter Geoghegan



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: SELECT results in "ERROR: index key does not match expected index column"
Next
From: Andrew Gierth
Date:
Subject: Re: SELECT results in "ERROR: index key does not match expected index column"