From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: automatically generating node support functions
Date: Mon, 14 Feb 2022 20:47:33 -0500
Message-ID: <2972050.1644889653@sss.pgh.pa.us> (raw)
In-Reply-To: <20220215013246.ya3cb6stf4taqxjt@alap3.anarazel.de>
References: <c091e5cd-45f8-69ee-6a9b-de86912cc7e7@enterprisedb.com>
<b85eec6e-a54b-6c72-97f8-2a6fbf4f9070@enterprisedb.com>
<c683a356-4d22-4126-bf55-64ed54e06014@enterprisedb.com>
<50fedc80-4104-bdc8-d777-04f030fc550f@dunslane.net>
<7848b872-7a10-67b2-b55f-7c9c475ae863@enterprisedb.com>
<40a2e977-98ba-0c01-af6c-9dfb39e864ba@enterprisedb.com>
<812ea8eb-6827-ba32-6ec0-6714f7ffa5dd@enterprisedb.com>
<2905876.1644858587@sss.pgh.pa.us>
<20220214232348.dt3uxaoq3rdka2aj@alap3.anarazel.de>
<2960078.1644881541@sss.pgh.pa.us>
<20220215013246.ya3cb6stf4taqxjt@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2022-02-14 18:32:21 -0500, Tom Lane wrote:
>> I think that finishing out and committing this patch is a fine step
>> on the way to that.
> I think most of gen_node_support.pl would change - a lot of that is generating
> the node functions, which would not be needed anymore. And most of the
> remainder would change as well.
Well, yeah, we'd be throwing away some of that Perl code. So what?
I think that most of the intellectual content in this patch is getting
the data source nailed down, ie putting the annotations into the *nodes.h
files and building the code to parse that. I don't have a problem
with throwing away and rewriting the back-end part of the patch later.
And, TBH, I am not really convinced that a pure metadata approach is going
to work out, or that it will have sufficient benefit over just automating
the way we do it now. I notice that Peter's patch leaves a few
too-much-of-a-special-case functions unconverted, which is no real
problem for his approach; but it seems like you won't get to take such
shortcuts in a metadata-reading implementation.
The bottom line here is that I believe that Peter's patch could get us out
of the business of hand-maintaining the backend/nodes/*.c files in the
v15 timeframe, which would be a very nice thing. I don't see how your
patch will be ready on anywhere near the same schedule. When it is ready,
we can switch, but in the meantime I'd like the maintenance benefit.
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, peter.eisentraut@enterprisedb.com
Subject: Re: automatically generating node support functions
In-Reply-To: <2972050.1644889653@sss.pgh.pa.us>
References: <c091e5cd-45f8-69ee-6a9b-de86912cc7e7@enterprisedb.com> <b85eec6e-a54b-6c72-97f8-2a6fbf4f9070@enterprisedb.com> <c683a356-4d22-4126-bf55-64ed54e06014@enterprisedb.com> <50fedc80-4104-bdc8-d777-04f030fc550f@dunslane.net> <7848b872-7a10-67b2-b55f-7c9c475ae863@enterprisedb.com> <40a2e977-98ba-0c01-af6c-9dfb39e864ba@enterprisedb.com> <812ea8eb-6827-ba32-6ec0-6714f7ffa5dd@enterprisedb.com> <2905876.1644858587@sss.pgh.pa.us> <20220214232348.dt3uxaoq3rdka2aj@alap3.anarazel.de> <2960078.1644881541@sss.pgh.pa.us> <20220215013246.ya3cb6stf4taqxjt@alap3.anarazel.de> <2972050.1644889653@sss.pgh.pa.us>
* 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