Re: SQL/JSON features for v15 - Mailing list pgsql-hackers

From Amit Langote
Subject Re: SQL/JSON features for v15
Date
Msg-id CA+HiwqECHA0aUi0Bo3tdYTJ27i2MRWUZ5BewQoO0WgRvRXQO-Q@mail.gmail.com
Whole thread Raw
In response to Re: SQL/JSON features for v15  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: SQL/JSON features for v15
List pgsql-hackers
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.

-- 
Thanks, Amit Langote
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Small cleanups to tuplesort.c and a bonus small performance improvement
Next
From: Ranier Vilela
Date:
Subject: Avoid overhead open-close indexes (catalog updates)