Re: remaining sql/json patches

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, jian he <jian(dot)universality(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: remaining sql/json patches
Date: 2023-09-29 04:57:46
Message-ID: CA+HiwqETtgH0ESDEEGDwTmazmtNeR7UsJS=BOoa=ghdYMo+Ufg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 28, 2023 at 8:04 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> On 2023-Sep-27, Amit Langote wrote:
> > Maybe the following is better:
> >
> > + /*
> > + * For expression nodes that support soft errors. Should be set to NULL
> > + * before calling ExecInitExprRec() if the caller wants errors thrown.
> > + */
> >
> > ...as in the attached.
>
> That's good.
>
> > Alvaro, do you think your concern regarding escontext not being in the
> > right spot in the ExprState struct is addressed? It doesn't seem very
> > critical to me to place it in the struct's 1st cacheline, because
> > escontext is not accessed in performance critical paths such as during
> > expression evaluation, especially with the latest version. (It would
> > get accessed during evaluation with previous versions.)
> >
> > If so, I'd like to move ahead with committing it.
>
> Yeah, looks OK to me in v21.

Thanks. I will push the attached 0001 shortly.

Also, I've updated 0002's commit message to mention why it only
changes the functions local to jsonfuncs.c to add the Node *escontext
parameter, but not any external ones that may be invoked, such as,
makeMdArrayResult(). The assumption behind that is that jsonfuncs.c
functions validate any data that they pass to such external functions,
so no *suppressible* errors should occur.

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

Attachment Content-Type Size
v22-0002-Add-soft-error-handling-to-populate_record_field.patch application/octet-stream 23.2 KB
v22-0005-Claim-SQL-standard-compliance-for-SQL-JSON-featu.patch application/octet-stream 2.3 KB
v22-0001-Add-soft-error-handling-to-some-expression-nodes.patch application/octet-stream 16.8 KB
v22-0004-JSON_TABLE.patch application/octet-stream 170.9 KB
v22-0003-SQL-JSON-query-functions.patch application/octet-stream 203.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2023-09-29 05:52:14 Re: Invalidate the subscription worker in cases where a user loses their superuser status
Previous Message Peter Smith 2023-09-29 04:51:10 [PGDOCS] change function linkend to refer to a more relevant target