pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add read support for some missing raw parse nodes
Date: Sat, 24 Sep 2022 22:29:27 +0000
Message-ID: <E1ocDeJ-001rN6-0y@gemulon.postgresql.org> (raw)

Add read support for some missing raw parse nodes

The node types A_Const, Constraint, and A_Expr had custom output
functions, but no read functions were implemented so far.

The A_Expr output format had to be tweaked a bit to make it easier to
parse.

Be a bit more cautious about applying strncmp to unterminated strings.

Also error out if an unrecognized enum value is found in each case,
instead of just printing a placeholder value.  That was maybe ok for
debugging but won't work if we want to have robust round-tripping.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/4159834.1657405226@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/backend/nodes/outfuncs.c   |   9 +-
src/backend/nodes/readfuncs.c  | 249 ++++++++++++++++++++++++++++++++++++++++-
src/include/nodes/parsenodes.h |   6 +-
3 files changed, 253 insertions(+), 11 deletions(-)



Message-ID: <E1ocDeJ-001rN6-0y@gemulon.postgresql.org>
Permalink:  ../E1ocDeJ-001rN6-0y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ocDeJ-001rN6-0y@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 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: peter@eisentraut.org
  Subject: Re: pgsql: Add read support for some missing raw parse nodes
  In-Reply-To: <E1ocDeJ-001rN6-0y@gemulon.postgresql.org>
  References: <E1ocDeJ-001rN6-0y@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