recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability - Mailing list pgsql-hackers

From jian he
Subject recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability
Date
Msg-id CACJufxFZGhVsAAiTSAi9HOJPJ-bGyG6QkhNmS=mzWHZWxecbng@mail.gmail.com
Whole thread Raw
Responses Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability
List pgsql-hackers

Hi.
this commit [0] changes immutability of jsonb_path_query, jsonb_path_query_first? If so, it may change other functions also.

demo:

begin;
SET LOCAL TIME ZONE 10.5;
with cte(s) as (select jsonb '"2023-08-15 12:34:56 +05:30"')

select jsonb_path_query(s, '$.timestamp_tz()')::text,'+10.5'::text,'timestamp_tz'::text from cte
union all
select jsonb_path_query(s, '$.time()')::text,'+10.5'::text, 'time'::text from cte
union all
select jsonb_path_query(s, '$.timestamp()')::text,'+10.5'::text,'timestamp'::text from cte
union all
select jsonb_path_query(s, '$.date()')::text,'+10.5'::text, 'date'::text from cte
union all
select jsonb_path_query(s, '$.time_tz()')::text,'+10.5'::text, 'time_tz'::text from cte;

SET LOCAL TIME ZONE -8;
with cte(s) as (select jsonb '"2023-08-15 12:34:56 +05:30"')
select jsonb_path_query(s, '$.timestamp_tz()')::text,'-8'::text,'timestamp_tz'::text from cte
union all
select jsonb_path_query(s, '$.time()')::text,'-8'::text, 'time'::text from cte
union all
select jsonb_path_query(s, '$.timestamp()')::text,'-8'::text,'timestamp'::text from cte
union all
select jsonb_path_query(s, '$.date()')::text,'-8'::text, 'date'::text from cte
union all
select jsonb_path_query(s, '$.time_tz()')::text,'-8'::text, 'time_tz'::text from cte;
commit;


pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Why is subscription/t/031_column_list.pl failing so much?
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Synchronizing slots from primary to standby