From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Split JSON lexer/parser from 'json' data type support.
Date: Fri, 24 Jan 2020 18:22:55 +0000
Message-ID: <E1iv3bb-000276-4o@gemulon.postgresql.org> (raw)
Split JSON lexer/parser from 'json' data type support.
Keep the code that pertains to the 'json' data type in json.c, but
move the lexing and parsing code to a new file jsonapi.c, a name
I chose because the corresponding prototypes are in jsonapi.h.
This seems like a logical division, because the JSON lexer and parser
are also used by the 'jsonb' data type, but the SQL-callable functions
in json.c are a separate thing. Also, the new jsonapi.c file needs to
include far fewer header files than json.c, which seems like a good
sign that this is an appropriate place to insert an abstraction
boundary. I took the opportunity to remove a few apparently-unneeded
includes from json.c at the same time.
Patch by me, reviewed by David Steele, Mark Dilger, and Andrew
Dunstan. The previous commit was, too, but I forgot to note it
in the commit message.
Discussion: http://postgr.es/m/CA+TgmoYfOXhd27MUDGioVh6QtpD0C1K-f6ObSA10AWiHBAL5bA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/11b5e3e35d3900164cb36754ee4e4dcab0bd02f0
Modified Files
--------------
src/backend/utils/adt/Makefile | 1 +
src/backend/utils/adt/json.c | 1206 +-------------------------------------
src/backend/utils/adt/jsonapi.c | 1216 +++++++++++++++++++++++++++++++++++++++
src/include/utils/jsonapi.h | 6 +
4 files changed, 1224 insertions(+), 1205 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: Split JSON lexer/parser from 'json' data type support.
In-Reply-To: <E1iv3bb-000276-4o@gemulon.postgresql.org>
References: <E1iv3bb-000276-4o@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