Re: automatically generating node support functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: automatically generating node support functions
Date
Msg-id 2972050.1644889653@sss.pgh.pa.us
Whole thread Raw
In response to Re: automatically generating node support functions  (Andres Freund <andres@anarazel.de>)
Responses Re: automatically generating node support functions  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Joseph Koshakow
Date:
Subject: Re: Fix overflow in justify_interval related functions
Next
From: Andres Freund
Date:
Subject: Re: Mark all GUC variable as PGDLLIMPORT