Re: Missing dependency tracking for TableFunc nodes

Mark Dilger <hornschnorter@gmail.com>

From: Mark Dilger <hornschnorter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2019-11-11T22:33:24Z
Lists: pgsql-hackers

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



Commits

  1. Include TableFunc references when computing expression dependencies.