From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rearrange pseudotypes.c to get rid of duplicative code.
Date: Sat, 14 Mar 2020 19:31:52 +0000
Message-ID: <E1jDCVk-0000yo-3V@gemulon.postgresql.org> (raw)
Rearrange pseudotypes.c to get rid of duplicative code.
Commit a5954de10 replaced a lot of manually-coded stub I/O routines
with code generated by macros. That was a good idea but it didn't
go far enough, because there were still manually-coded stub input
routines for types that had live output routines. Refactor the
macro so that we can generate just a stub input routine at need.
Also create similar macros to generate stub binary I/O routines,
since we have some of those now. The only stub functions that remain
hand-coded are shell_in() and shell_out(), which need to be separate
because they use different error messages.
While here, rearrange the commentary to discuss each type not each
function. This provides a better way to explain the *why* of which
types need which support, rather than just duplicatively annotating
the functions.
Discussion: https://postgr.es/m/24137.1584139352@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/87c9c2571c8146f1594830072253ba39e62ccbc8
Modified Files
--------------
src/backend/utils/adt/pseudotypes.c | 348 +++++++++++++-----------------------
1 file changed, 123 insertions(+), 225 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Rearrange pseudotypes.c to get rid of duplicative code.
In-Reply-To: <E1jDCVk-0000yo-3V@gemulon.postgresql.org>
References: <E1jDCVk-0000yo-3V@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox