Handle NULL fields in WRITE_INDEX_ARRAY
authorPeter Eisentraut <[email protected]>
Wed, 27 Apr 2022 07:15:09 +0000 (09:15 +0200)
committerPeter Eisentraut <[email protected]>
Wed, 27 Apr 2022 07:15:09 +0000 (09:15 +0200)
commit9ddf251f94090cebf1bd8fc18396cb8a4b580d04
treef800569010ea6064953208a4fd192126ba31953c
parent06cafd6f577ba251ac10d4f009fc3be424705a37
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 <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/CAMbWs4-LN%3DbF8f9eU2R94dJtF54DfDvBq%2BovqHnOQqbinYDrUw%40mail.gmail.com
src/backend/nodes/outfuncs.c