Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it
Date: 2025-05-28 06:55:16
Message-ID: CACJufxEKjGZ+9vjOMs0YM5VThZe5HFXrDbJQPm++RA7=HBj_xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 19, 2025 at 9:09 AM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
> hi.
>
> somehow, I accidentally saw the TODOs (commits [3]) on jsonb.c and json.c
> for functions: to_json_is_immutable and to_jsonb_is_immutable.
> The attached patch is to finalize these TODOs.
>
> per coverage [1], [2], there was zero coverage for these two functions.
> so I also added extensive tests on it.
>

I didn't include "utils/rel.h", so v1-0001 won't compile.
The tests were overly verbose,
so I removed some unnecessary ones to simplify them.

Attachment Content-Type Size
v2-0001-enhance-json_array-json_object-expression-is-immutable-or.patch text/x-patch 20.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-05-28 07:38:51 Re: ALTER DOMAIN ADD NOT NULL NOT VALID
Previous Message Michael Paquier 2025-05-28 06:48:14 Re: [PATCH] PGSERVICEFILE as part of a normal connection string