Re: [HACKERS] jsonb_to_tsvector should be immutable

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] jsonb_to_tsvector should be immutable
Дата
Msg-id b967fffc-ccce-bd87-7aeb-882658758be6@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] jsonb_to_tsvector should be immutable  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] jsonb_to_tsvector should be immutable  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 06/08/2017 02:26 PM, Tom Lane wrote:
> Josh Berkus <josh@berkus.org> writes:
>> select proname, prosrc, proargtypes, provolatile from pg_proc where
>> proname = 'to_tsvector';
> Slightly more readable version:
>
> regression=# select oid::regprocedure, provolatile, proparallel from pg_proc where proname = 'to_tsvector';
>              oid              | provolatile | proparallel 
> ------------------------------+-------------+-------------
>  to_tsvector(jsonb)           | s           | s
>  to_tsvector(regconfig,text)  | i           | s
>  to_tsvector(text)            | s           | s
>  to_tsvector(json)            | s           | s
>  to_tsvector(regconfig,jsonb) | s           | s
>  to_tsvector(regconfig,json)  | s           | s
> (6 rows)
>
>> Both of the _byid functions should be marked immutable, no?  Otherwise
>> how can users use the new functions for indexing?
> Yeah, if the (regconfig,text) one is considered immutable, I don't see
> why the other two aren't.  The justification for the other three being
> only stable is that they depend on default_text_search_config.
>
> (You could argue that none of these should be immutable because text
> search configurations are changeable, but we already decided to ignore
> that for the (regconfig,text) case.)
>
>             



Yes, agreed it should be done consistently with text.

cheers

andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] PG10 transition tables, wCTEs and multiple operationson the same table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] jsonb_to_tsvector should be immutable