pgsql: Handle NULL fields in WRITE_INDEX_ARRAY

Started by Peter Eisentrautabout 4 years ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Handle NULL fields in WRITE_INDEX_ARRAY

Unlike existing WRITE_*_ARRAY macros, WRITE_INDEX_ARRAY needs to
handle the case that the field is NULL. We already have the
convention to print NULL fields as "<>", so we do that here as well.
There is currently no corresponding read function for this, so reading
this back in is not implemented, but it could be if needed.

Reported-by: Richard Guo <guofenglinux@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: /messages/by-id/CAMbWs4-LN=bF8f9eU2R94dJtF54DfDvBq+ovqHnOQqbinYDrUw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9ddf251f94090cebf1bd8fc18396cb8a4b580d04

Modified Files
--------------
src/backend/nodes/outfuncs.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)