pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support json_errdetail in FRONTEND code
Date: Sun, 17 Mar 2024 23:03:35 +0000
Message-ID: <E1rlzXS-004LYx-LF@gemulon.postgresql.org> (raw)

Support json_errdetail in FRONTEND code

Allocate memory for the error message inside memory owned by the
JsonLexContext and move responsibility away from the caller for
freeing it.  This means that we can partially revert b44669b2ca
as this is now safe to use in FRONTEND code.  The motivation for
this comes from the OAuth and incremental JSON patchsets but it
also adds value on its own.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi+mWdTd6ujtyF7MsvXvk7ToLRVG_tYAcaGbQLvf=N4KrQw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d6607016c738a5ccdd9422f3c11778903a03cdbb

Modified Files
--------------
src/bin/pg_verifybackup/t/005_bad_manifest.pl |   3 +-
src/common/jsonapi.c                          | 121 +++++++++++++++-----------
src/common/parse_manifest.c                   |   2 +-
src/include/common/jsonapi.h                  |   1 +
4 files changed, 73 insertions(+), 54 deletions(-)



view thread (4+ messages)

Message-ID: <E1rlzXS-004LYx-LF@gemulon.postgresql.org>
Permalink:  ../E1rlzXS-004LYx-LF@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rlzXS-004LYx-LF@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Support json_errdetail in FRONTEND code
  In-Reply-To: <E1rlzXS-004LYx-LF@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox