pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <hornschnorter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: Missing dependency tracking for TableFunc nodes
Date: Mon, 11 Nov 2019 14:33:24 -0800
Message-ID: <352b500b-9bf5-6e6a-fcf4-d9847738e977@gmail.com> (raw)
In-Reply-To: <18427.1573508501@sss.pgh.pa.us>
References: <18427.1573508501@sss.pgh.pa.us>



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





view thread (18+ messages)  latest in thread

Message-ID: <352b500b-9bf5-6e6a-fcf4-d9847738e977@gmail.com>
Permalink:  ../352b500b-9bf5-6e6a-fcf4-d9847738e977@gmail.com/
Also on:    postgresql.org/message-id/352b500b-9bf5-6e6a-fcf4-d9847738e977@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hornschnorter@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Missing dependency tracking for TableFunc nodes
  In-Reply-To: <352b500b-9bf5-6e6a-fcf4-d9847738e977@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox