Fix output of char node fields
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 22 Jun 2017 02:57:23 +0000 (22:57 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 5 Jul 2017 14:51:54 +0000 (10:51 -0400)
commitd80e73f2293429cf8a0a13c243852379ec2e37e2
treea54e87faf18d532fc23542084217496940d7ffe7
parent5191e357cf22e200a9baaf97bbe8a07ee2537537
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.
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c