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

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: SELECT results in "ERROR: index key does not match expected index column"
Дата
Msg-id CAH2-WzmzRVSpPM8wKXxfreZOuLWjhaW35M9wrFun31-+TohmQw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SELECT results in "ERROR: index key does not match expected index column"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SELECT results in "ERROR: index key does not match expected index column"
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: SELECT results in "ERROR: index key does not match expected index column"