Re: Why are JSON extraction functions STABLE and not IMMUTABLE?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Why are JSON extraction functions STABLE and not IMMUTABLE?
Дата
Msg-id 516C1D5B.9030904@dunslane.net
обсуждение исходный текст
Ответ на Why are JSON extraction functions STABLE and not IMMUTABLE?  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: Why are JSON extraction functions STABLE and not IMMUTABLE?  (hubert depesz lubaczewski <depesz@depesz.com>)
Re: Why are JSON extraction functions STABLE and not IMMUTABLE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Why are JSON extraction functions STABLE and not IMMUTABLE?  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 04/15/2013 11:16 AM, hubert depesz lubaczewski wrote:
> In current 9.3, I see:
>
> $ select p.proname, p.provolatile from pg_proc p join pg_namespace n on p.pronamespace = n.oid where n.nspname =
'pg_catalog'and p.proname ~ 'json';
 
>            proname          | provolatile
> ---------------------------+-------------
>   json_in                   | s
>   json_out                  | i
>   json_recv                 | s
>   json_send                 | s
>   array_to_json             | s
>   array_to_json             | s
>   row_to_json               | s
>   row_to_json               | s
>   json_agg_transfn          | i
>   json_agg_finalfn          | i
>   json_agg                  | i
>   to_json                   | s
>   json_object_field         | s
>   json_object_field_text    | s
>   json_array_element        | s
>   json_array_element_text   | s
>   json_extract_path         | s
>   json_extract_path_op      | s
>   json_extract_path_text    | s
>   json_extract_path_text_op | s
>   json_array_elements       | s
>   json_array_length         | s
>   json_object_keys          | s
>   json_each                 | s
>   json_each_text            | s
>   json_populate_record      | s
>   json_populate_recordset   | s
> (27 rows)
>
> Is there any particular reason extract functions
> (object_field/array_element/...) can't be immutable?
>
> I can't readily imagine a situation where output of these functions would
> change for different queries.
>

Me either. It's an oversight, really. Unless there is any objection I'll 
change them toot sweet. What about the existing (as of 9.2) functions?

cheers

andrew




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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: WIP: index support for regexp search
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Why are JSON extraction functions STABLE and not IMMUTABLE?