From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Add missing support for new node fields |
Date: | 2017-03-21 14:56:13 |
Message-ID: | 31303.1490108173@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2017-03-21 07:22:57 +0100, Fabien COELHO wrote:
>> I've been annoyed by these stupid functions and forgetting to update them
>> since I run into them while trying to fix an issue in pg_stat_statement some
>> time ago.
>>
>> I've started to develop a perl script to generate most of them from headers.
>> It is not done yet, but it looks that it can work in the end with limited
>> effort. Currently it works for copy & equal.
> It'd have to do out/read as well imo.
Yeah. A partial solution is pretty much useless. Even with out/read
support as well, I'm not sure it's not useless, because you'd still
have to remember to consider places like expression_tree_walker and
expression_tree_mutator. Those are not really amenable to automatic
generation AFAICS, because they have to understand the actual semantics
of each field.
It's conceivable that you could get somewhere if the starting point were
some marked-up representation of every node type's field list, rather than
just a C declaration. (IOW, include/nodes/*.h would become generated
files as well.) But really, isn't that just moving the error locale from
"forgetting to update equalfuncs.c" to "forgetting to include the correct
marker keywords"? And people would have to learn about this generator
tool and its input language.
In the end there's very little substitute for checking every reference
to a struct type when you add/modify one of its fields. grep is your
friend.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-03-21 15:07:39 | Re: [COMMITTERS] pgsql: Add missing support for new node fields |
Previous Message | Simon Riggs | 2017-03-21 14:16:52 | pgsql: Add a pg_recvlogical wrapper to PostgresNode |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-03-21 15:07:39 | Re: [COMMITTERS] pgsql: Add missing support for new node fields |
Previous Message | Robert Haas | 2017-03-21 14:46:38 | Re: Removing binaries |