Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it
Date
Msg-id e402612a-c44e-48e1-81d3-84753571e2d6@dunslane.net
Whole thread Raw
In response to Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it  (jian he <jian.universality@gmail.com>)
Responses Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it
List pgsql-hackers
On 2026-01-08 Th 2:05 AM, jian he wrote:
> hi.
>
> rebase due to conflict in
> https://git.postgresql.org/cgit/postgresql.git/commit/?id=ba75f717526cbaa9000b546aac456e43d03aaf53
>
>

Here's a rework of this patch. It preserves the original signature of 
to_json{b}_is_immutable, and fixes some code duplication. It also uses 
the typecache to get composite info instead of calling relation_open, 
supports MultiRange types, and exits early if we made a recursive call 
(no need for json_categorize_type etc. in these cases).


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add expressions to pg_restore_extended_stats()
Next
From: Daniel Gustafsson
Date:
Subject: Re: on SGML files is used for what ?