public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniel Gustafsson <[email protected]>
To: Martin Butter <[email protected]>
Cc: [email protected]
Subject: Re: 16beta2 SQL parser: different defaults on absent_on_null
Date: Fri, 14 Jul 2023 10:29:53 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> On 14 Jul 2023, at 07:53, Martin Butter <[email protected]> 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







view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: 16beta2 SQL parser: different defaults on absent_on_null
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox