pgsql: Fix output of char node fields

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix output of char node fields
Date: 2017-07-05 14:56:23
Message-ID: E1dSlj5-0003sm-Tv@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix output of char node fields

WRITE_CHAR_FIELD() didn't do any escaping, so that for example a zero
byte would cause the whole output string to be truncated. To fix, pass
the char through outToken(), so it is escaped like a string. Adjust the
reading side to handle this.

Branch
------
master

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

Modified Files
--------------
src/backend/nodes/outfuncs.c | 20 +++++++++++++++++++-
src/backend/nodes/readfuncs.c | 3 ++-
2 files changed, 21 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-07-05 17:39:57 pgsql: pg_ctl: Make failure to complete operation a nonzero exit
Previous Message Peter Eisentraut 2017-07-05 01:13:34 pgsql: psql documentation fixes