On 11/11/19 1:41 PM, Tom Lane wrote:
Would it be a good idea to move find_expr_references_walker to
nodeFuncs.c, in hopes of making it more visible to people adding
new node types?

I'm not sure that would be enough. The logic of that function is not immediately obvious, and where to add a node to it might not occur to people. If the repeated use of

    else if (IsA(node, XXX))

were replaced with

    switch (nodeTag(node)) {
        case XXX:

then the compiler, ala -Wswitch, would alert folks when they forget to handle a new node type.

--
Mark Dilger


Reply via email to