From: Jonathan S. Katz <jkatz@postgresql.org>
To: Andrew Dunstan <andrew@dunslane.net>
To: Amit Langote <amitlangote09@gmail.com>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: John Naylor <john.naylor@enterprisedb.com>
Subject: Re: SQL/JSON features for v15
Date: Wed, 31 Aug 2022 10:20:24 -0400
Message-ID: <2276d20d-43ff-f9f6-5c9c-c2875739e66c@postgresql.org> (raw)
In-Reply-To: <abd31e0b-56aa-044f-6700-8a1c1bba87f1@dunslane.net>
References: <CA+HiwqH8gTp2uNN3QtgeOSgHhZUZz1=0U+JObJJUmEoch_269Q@mail.gmail.com>
<20220830092008.6dbublx6la226zis@alvherre.pgsql>
<CA+HiwqFvP23i3kTHt6TW4FqO6he1YSJXeyGOdFV_YbP=xeS99A@mail.gmail.com>
<f54ebd2b-0e67-d1c6-4ff7-5d732492d1a0@postgrespro.ru>
<CA+HiwqHLVPdA7e3Y-S5giKPsqQPf8M0nuvgz8+3D8GjQexXLYA@mail.gmail.com>
<CA+HiwqECHA0aUi0Bo3tdYTJ27i2MRWUZ5BewQoO0WgRvRXQO-Q@mail.gmail.com>
<abd31e0b-56aa-044f-6700-8a1c1bba87f1@dunslane.net>
On 8/31/22 8:38 AM, Andrew Dunstan wrote:
>
> On 2022-08-31 We 07:01, Amit Langote wrote:
>> On Wed, Aug 31, 2022 at 3:51 PM Amit Langote <amitlangote09@gmail.com> wrote:
>>> SELECT JSON_VALUE(jsonb '"aaa"', '$' RETURNING int DEFAULT 111 ON ERROR);
>>> - json_value
>>> -------------
>>> - 111
>>> -(1 row)
>>> -
>>> +ERROR: syntax error at or near "DEFAULT"
>>> +LINE 1: ...ELECT JSON_VALUE(jsonb '"aaa"', '$' RETURNING int DEFAULT 11...
>>>
>>> Is it intentional that you left many instances of the regression test
>>> output changes like the above?
>> Actually, thinking more about this, I am wondering if we should not
>> remove the DEFAULT expression productions in gram.y. Maybe we can
>> keep the syntax and give an unsupported error during parse-analysis,
>> like the last version of the patch did for DEFAULT ON EMPTY. Which
>> also means to also leave JsonBehavior alone but with default_expr
>> always NULL for now.
>>
>
> Producing an error in the parse analysis phase seems best to me.
Andres, Robert, Tom: With this recent work, have any of your opinions
changed on including SQL/JSON in v15?
Thanks,
Jonathan
Attachments:
OpenPGP_signature (application/pgp-signature, 839B) download
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: pgsql-hackers@postgresql.org
Cc: jkatz@postgresql.org, andrew@dunslane.net, amitlangote09@gmail.com, n.gluhov@postgrespro.ru, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, michael@paquier.xyz, john.naylor@enterprisedb.com
Subject: Re: SQL/JSON features for v15
In-Reply-To: <2276d20d-43ff-f9f6-5c9c-c2875739e66c@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox