pgsql: Handle NULL fields in WRITE_INDEX_ARRAY

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Handle NULL fields in WRITE_INDEX_ARRAY
Date: 2022-04-27 07:16:13
Message-ID: E1njbuH-001L83-Fb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://www.postgresql.org/message-id/flat/CAMbWs4-LN%3DbF8f9eU2R94dJtF54DfDvBq%2BovqHnOQqbinYDrUw%40mail.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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-04-27 07:55:48 pgsql: Fix incorrect format placeholders
Previous Message Bharath Rupireddy 2022-04-27 03:27:23 Re: pgsql: Add contrib/pg_walinspect.