WRITE_*_ARRAY macros for outfuncs.c

Lists: pgsql-hackers
From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: WRITE_*_ARRAY macros for outfuncs.c
Date: 2018-12-18 21:12:05
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

In readfuncs.c, we have READ_ATTRNUMBER_ARRAY, READ_OID_ARRAY,
READ_INT_ARRAY, READ_BOOL_ARRAY, but the writing side in outfuncs.c is
coded by hand in each case. Any reason for this?

Here is a patch that adds WRITE_ATTRNUMBER_ARRAY, WRITE_OID_ARRAY,
WRITE_INT_ARRAY, WRITE_BOOL_ARRAY. That seems much nicer.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Add-WRITE_-_ARRAY-macros.patch text/plain 13.5 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WRITE_*_ARRAY macros for outfuncs.c
Date: 2018-12-19 17:11:08
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> In readfuncs.c, we have READ_ATTRNUMBER_ARRAY, READ_OID_ARRAY,
> READ_INT_ARRAY, READ_BOOL_ARRAY, but the writing side in outfuncs.c is
> coded by hand in each case. Any reason for this?

> Here is a patch that adds WRITE_ATTRNUMBER_ARRAY, WRITE_OID_ARRAY,
> WRITE_INT_ARRAY, WRITE_BOOL_ARRAY. That seems much nicer.

LGTM.

regards, tom lane