Re: automatically generating node support functions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: automatically generating node support functions
Дата
Msg-id 20210611192353.ugmjp2txdwp2duls@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: automatically generating node support functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: automatically generating node support functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2021-06-08 19:45:58 +0200, Peter Eisentraut wrote:
> On 08.06.21 15:40, David Rowley wrote:
> > It's almost 2 years ago now, but I'm wondering if you saw what Andres
> > proposed in [1]?  The idea was basically to make a metadata array of
> > the node structs so that, instead of having to output large amounts of
> > .c code to do read/write/copy/equals, instead just have small
> > functions that loop over the elements in the array for the given
> > struct and perform the required operation based on the type.
> 
> That project was technologically impressive, but it seemed to have
> significant hurdles to overcome before it can be useful.  My proposal is
> usable and useful today.  And it doesn't prevent anyone from working on a
> more sophisticated solution.

I think it's short-sighted to further and further go down the path of
parsing "kind of C" without just using a proper C parser. But leaving
that aside, a big part of the promise of the approach in that thread
isn't actually tied to the specific way the type information is
collected: The perl script could output something like the "node type
metadata" I generated in that patchset, and then we don't need the large
amount of generated code and can much more economically add additional
operations handling node types.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [Proposal] Add accumulated statistics for wait event
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command