Re: Nondeterministic collations vs. text_pattern_ops

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Nondeterministic collations vs. text_pattern_ops
Дата
Msg-id c7e57eaf-5d7f-22b6-6f48-85580889de8d@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Nondeterministic collations vs. text_pattern_ops  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Nondeterministic collations vs. text_pattern_ops  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2019-09-17 17:17, Tom Lane wrote:
> My recommendation is to get rid of the run-time checks and instead
> put a hack like this into DefineIndex or some minion thereof:
> 
>     if ((opclass == TEXT_PATTERN_BTREE_CLASS_OID ||
>          opclass == VARCHAR_PATTERN_BTREE_CLASS_OID ||
>          opclass == BPCHAR_PATTERN_BTREE_CLASS_OID) &&
>         !get_collation_isdeterministic(collid))
>        ereport(ERROR, ...);

Here is a draft patch.

It will require a catversion change because those operator classes don't
have assigned OIDs so far.

The comment block I just moved over for the time being.  It should
probably be rephrased a bit.

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

Вложения

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

Предыдущее
От: Ahsan Hadi
Дата:
Сообщение: Re: enhance SPI to support EXECUTE commands
Следующее
От: Alexey Kondratov
Дата:
Сообщение: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly