| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | 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: | 2026-03-17 15:32:02 |
| Message-ID: | 60683900-69e2-4c62-addb-e3ad3b88a129@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-03-10 Tu 9:53 PM, jian he wrote:
> On Tue, Mar 10, 2026 at 10:12 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> OK, here's a v7.
>>
>> . added a break in the loop if we found something mutable
>>
>> . added test for JSON generated columns (was present for JSONB
>> expression indexes but missing for JSON).
>>
>> . added test block demonstrating that range_int (subtype=int) and
>> multirange_int are now correctly treated as immutable, allowing
>> expression indexes via json_array()
>> and json_object()
>>
> V7 looks good to me.
> one minor issue:
>
> +-- JSON_OBJECTAGG, JSON_ARRAYAGG is aggregate function, can not be
> used in index
> +create index xx on test_mutability(json_objectagg(a: b absent on null
> with unique keys returning jsonb));
> +ERROR: aggregate functions are not allowed in index expressions
> +LINE 1: create index xx on test_mutability(json_objectagg(a: b absen...
> + ^
>
> +ERROR: aggregate functions are not allowed in index expressions
> This error case was never exercised in regression tests, so adding it
> here should be fine.
>
> "can not" should be "cannot".
>
>
Thanks. Pushed.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-03-17 15:34:26 | Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE |
| Previous Message | Peter 'PMc' Much | 2026-03-17 15:31:08 | Re: Need help debugging SIGBUS crashes |