| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Josh Berkus <josh(at)berkus(dot)org> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: jsonb_to_tsvector should be immutable |
| Date: | 2017-06-08 18:26:58 |
| Message-ID: | 6167.1496946418@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Josh Berkus <josh(at)berkus(dot)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.)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2017-06-08 18:32:24 | Re: PG10 transition tables, wCTEs and multiple operations on the same table |
| Previous Message | Bruce Momjian | 2017-06-08 18:11:19 | Re: PG10 transition tables, wCTEs and multiple operations on the same table |