Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Andrew Dunstan
On 06/08/2017 03:06 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 06/08/2017 02:26 PM, Tom Lane wrote: >>> 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

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Tom Lane
Andrew Dunstan writes: > On 06/08/2017 02:26 PM, Tom Lane wrote: >> 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. > Yes, agreed it s

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Andrew Dunstan
On 06/08/2017 02:26 PM, Tom Lane wrote: > Josh Berkus 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 = '

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Tom Lane
Josh Berkus 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 | provol

[HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Josh Berkus
Wanted to pull this out of my general report, because nobody seems to have seen it: P3: apparently jsonb_to_tsvector with lang parameter isn't immutable? This means that it can't be used for indexing: libdata=# create index bookdata_fts on bookdata using gin (( to_tsvector('english',bookdata)));