Re: pg_parse_json() should not leak token copies on failure

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-05-24T15:43:01Z
Lists: pgsql-hackers

Attachments

On Tue, Apr 30, 2024 at 2:29 PM Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
> Attached is a draft patch to illustrate what I mean, but it's
> incomplete: it only solves the problem for scalar values.

(Attached is a v2 of that patch; in solving a frontend leak I should
probably not introduce a backend segfault.)

--Jacob

Commits

  1. jsonapi: add lexer option to keep token ownership