From: | Martin Butter <martin(dot)butter(at)splendiddata(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: 16beta2 SQL parser: different defaults on absent_on_null |
Date: | 2023-07-14 09:06:33 |
Message-ID: | f026586b-fbef-af4b-fcdc-f7d54d224870@splendiddata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Daniel,
Thanks for the explanation, it sounds reasonable. I'm glad it is not a bug.
Regards,
Martin.
On 14/07/2023 10:29, Daniel Gustafsson wrote:
>> On 14 Jul 2023, at 07:53, Martin Butter<martin(dot)butter(at)splendiddata(dot)com> wrote:
>> While adapting a Java implementation of the SQL parser, I noticed that in structures JsonArrayAgg, JsonArrayConstructor, JsonArrayQueryConstructor and JsonObjectConstrutor, the absent_on_null field defaults to TRUE.
>> But in JsonObjectAgg, absent_on_null defaults to FALSE.
>> Is that intentionally?
> I would say so, an empty NULL|ABSENT ON NULL clause for arrays is defined as
> true, while for objects it's defined as false (which is shared between both
> json_object() and json_objectagg()).
>
> --
> Daniel Gustafsson
>
--
Martin Butter
Developer
Splendid Data Nederland B.V.
Binnenhof 62A
1412 LC NAARDEN
T: +31 (0)85 773 19 99
M: +31 (0)6 226 946 62
E: martin(dot)butter(at)splendiddata(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Melih Mutlu | 2023-07-14 09:36:49 | Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication |
Previous Message | Peter Eisentraut | 2023-07-14 08:56:26 | Re: Remove distprep |