From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: common/jsonapi: support libpq as a client
Date: Wed, 11 Sep 2024 07:05:14 +0000
Message-ID: <E1soHPe-000YBc-KY@gemulon.postgresql.org> (raw)
common/jsonapi: support libpq as a client
Based on a patch by Michael Paquier.
For libpq, use PQExpBuffer instead of StringInfo. This requires us to
track allocation failures so that we can return JSON_OUT_OF_MEMORY as
needed rather than exit()ing.
Author: Jacob Champion <jacob.champion@enterprisedb.com>
Co-authored-by: Michael Paquier <michael@paquier.xyz>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/d1b467a78e0e36ed85a09adf979d04cf124a9d4b.camel@vmware.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0785d1b8b2fa27074eeb18a3ac1f2a0e76cb8339
Modified Files
--------------
src/common/Makefile | 23 +-
src/common/jsonapi.c | 473 +++++++++++++++------
src/common/meson.build | 35 +-
src/include/common/jsonapi.h | 18 +-
src/test/modules/test_json_parser/Makefile | 7 +-
src/test/modules/test_json_parser/meson.build | 12 +
.../t/001_test_json_parser_incremental.pl | 25 +-
src/test/modules/test_json_parser/t/002_inline.pl | 177 ++++----
.../test_json_parser/t/003_test_semantic.pl | 31 +-
9 files changed, 558 insertions(+), 243 deletions(-)
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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: common/jsonapi: support libpq as a client
In-Reply-To: <E1soHPe-000YBc-KY@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