Re: Document DateStyle effect on jsonpath string()
От | Tom Lane |
---|---|
Тема | Re: Document DateStyle effect on jsonpath string() |
Дата | |
Msg-id | 3811774.1726063865@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Document DateStyle effect on jsonpath string() (Peter Eisentraut <peter@eisentraut.org>) |
Ответы |
Re: Document DateStyle effect on jsonpath string()
|
Список | pgsql-hackers |
Peter Eisentraut <peter@eisentraut.org> writes: > What I'm concerned about is that this makes the behavior of JSON_QUERY > non-immutable. Maybe there are other reasons for it to be > non-immutable, in which case this isn't important. But it might be > worth avoiding that? Fair point, but haven't we already bit that bullet with respect to timezones? [ looks... ] Hmm, it looks like jsonb_path_exists_tz is marked stable while jsonb_path_exists is claimed to be immutable. So yeah, there's a problem here. I'm not 100% convinced that jsonb_path_exists was truly immutable before, but for sure it is not now, and that's bad. regression=# select jsonb_path_query('"2023-08-15 12:34:56"', '$.timestamp().string()'); jsonb_path_query ----------------------- "2023-08-15 12:34:56" (1 row) regression=# set datestyle = postgres; SET regression=# select jsonb_path_query('"2023-08-15 12:34:56"', '$.timestamp().string()'); jsonb_path_query ---------------------------- "Tue Aug 15 12:34:56 2023" (1 row) regards, tom lane
В списке pgsql-hackers по дате отправления: