Andres Freund <andres@anarazel.de> writes:
> 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]?
>> 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.
I think the main reason that the previous patch went nowhere was general
resistance to making developers install something as complicated as
libclang --- that could be a big lift on non-mainstream platforms.
So IMO it's a feature not a bug that Peter's approach just uses a perl
script. OTOH, the downstream aspects of your patch did seem appealing.
So I'd like to see a merger of the two approaches, using perl for the
data extraction and then something like what you'd done. Maybe that's
the same thing you're saying.
I also see Peter's point that committing what he has here might be
a reasonable first step on that road. Getting the data extraction
right is a big chunk of the job, and what we do with it afterward
could be improved later.
regards, tom lane