Re: remaining sql/json patches - Mailing list pgsql-hackers

From Amit Langote
Subject Re: remaining sql/json patches
Date
Msg-id CA+HiwqEPsQoN4SxZ5qpMv11jT+keFhV-giQ+RXU34_9QAKGh8Q@mail.gmail.com
Whole thread Raw
In response to Re: remaining sql/json patches  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: remaining sql/json patches
List pgsql-hackers
On Tue, Sep 19, 2023 at 7:18 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> 0001: I wonder why you used Node for the ErrorSaveContext pointer
> instead of the specific struct you want.  I propose the attached, for
> some extra type-safety.  Or did you have a reason to do it that way?

No reason other than that most other headers use Node.  I agree that
making an exception for this patch might be better, so I've
incorporated your patch into 0001.

I've also updated the query functions patch (0003) to address the
crashing bug reported by Erik.  Essentially, I made the coercion step
of JSON_QUERY to always use json_populate_type() when WITH WRAPPER is
used.  You might get funny errors with ERROR OR ERROR for many types
when used in RETURNING, but at least there should no longer be any
crashes.

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

Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Standardize type of variable when extending Buffers
Next
From: Amit Langote
Date:
Subject: Re: remaining sql/json patches