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: Erik Rijkers <er(at)xs4all(dot)nl>, jian he <jian(dot)universality(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: remaining sql/json patches
Date: 2023-09-19 11:56:43
Message-ID: CA+HiwqEPsQoN4SxZ5qpMv11jT+keFhV-giQ+RXU34_9QAKGh8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 19, 2023 at 7:18 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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 Content-Type Size
v16-0001-Support-for-soft-error-handling-during-CoerceVia.patch application/octet-stream 14.5 KB
v16-0005-Claim-SQL-standard-compliance-for-SQL-JSON-featu.patch application/octet-stream 2.3 KB
v16-0002-Add-soft-error-handling-to-populate_record_field.patch application/octet-stream 41.3 KB
v16-0004-JSON_TABLE.patch application/octet-stream 170.8 KB
v16-0003-SQL-JSON-query-functions.patch application/octet-stream 203.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2023-09-19 12:00:02 Re: remaining sql/json patches
Previous Message Ranier Vilela 2023-09-19 11:29:51 Re: Standardize type of variable when extending Buffers