Re: cache lookup failed for collation 0

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: cache lookup failed for collation 0
Дата
Msg-id 787c1825-49f6-2c41-20cb-3252c7ee44e7@2ndquadrant.com
обсуждение исходный текст
Ответ на cache lookup failed for collation 0  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Ответы Re: cache lookup failed for collation 0  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
On 2019-04-11 17:04, Jeevan Chalke wrote:
> The error is coming from get_collation_isdeterministic() when colloid
> passed is 0. I think like we do in get_collation_name(), we should
> return false here when such collation oid does not exist.

I'm not in favor of doing that.  It would risk papering over errors of
omission at other call sites.

The root cause is that the same code match_pattern_prefix() is being
used for text and bytea, but bytea does not use collations, so having
the collation 0 is expected, and we shouldn't call
get_collation_isdeterministic() in that case.

Proposed patch attached.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: REINDEX CONCURRENTLY 2.0
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH v20] GSSAPI encryption support