From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Subject: | Making CallContext and InlineCodeBlock less special-case-y |
Date: | 2022-07-09 23:50:15 |
Message-ID: | 75063.1657410615@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
As committed, gen_node_support.pl excludes CallContext and InlineCodeBlock
from getting unneeded support functions via some very ad-hoc code.
(Right now, there are some other node types that are handled similarly,
but I'm looking to drive that set to empty.) After looking at the
situation a bit, I think the problem is that these nodes are declared
in parsenodes.h even though they have exactly nothing to do with
parse trees. What they are is function-calling API infrastructure,
so it seems like the most natural home for them is fmgr.h. A weaker
case could be made for funcapi.h, perhaps.
So I tried moving them to fmgr.h, and it blew up because they need
typedef NodeTag while fmgr.h does not #include nodes.h. I feel that
the most reasonable approach is to just give up on that bit of
micro-optimization and let fmgr.h include nodes.h. It was already
doing a bit of hackery to compile "Node *" references without that
inclusion, so this seems more clean not less so.
Hence, I propose the attached. (The changes in the PL files are
just to align them on a common best practice for an InlineCodeBlock
argument.)
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
clean-up-callcontext-inlinecodeblock.patch | text/x-diff | 8.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-07-10 00:45:07 | Re: Making CallContext and InlineCodeBlock less special-case-y |
Previous Message | Tom Lane | 2022-07-09 22:20:26 | Extending outfuncs support to utility statements |