Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4vre-0000l0-DL for pgsql-hackers@arkaria.postgresql.org; Mon, 23 May 2016 19:50:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b4vrd-0001zb-QR for pgsql-hackers@arkaria.postgresql.org; Mon, 23 May 2016 19:50:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b4vqI-0000Tj-BR for pgsql-hackers@postgresql.org; Mon, 23 May 2016 19:48:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b4vqE-00041x-7j for pgsql-hackers@postgresql.org; Mon, 23 May 2016 19:48:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u4NJmcML020097; Mon, 23 May 2016 15:48:38 -0400 From: Tom Lane To: Peter Geoghegan cc: Thomas Alton , Pg Hackers Subject: Re: Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE In-reply-to: References: <20160521232802.22598.13537@wrigleys.postgresql.org> <18383.1464031327@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Mon, 23 May 2016 12:28:45 -0700" Date: Mon, 23 May 2016 15:48:38 -0400 Message-ID: <20096.1464032918@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Peter Geoghegan writes: > On Mon, May 23, 2016 at 12:22 PM, Tom Lane wrote: >> It seems unlikely to me that recursing into the name lists is helpful >> here: those are not going to contain any data that is interpretable >> without context. Did you have a reason to do that? > I saw no reason to avoid the extra cycles. A noticeable omission has a > cost: it gets noticed. Given this code path is likely to hardly ever > be hit, this mechanical approach seemed best. That's all. I agree that performance isn't much of a concern, but code bloat and inconsistency with other cases are valid concerns. That function does not recurse into name lists in, for example, the A_Expr and FuncCall cases. Also, related to this complaint though not this patch, it's disturbing that this oversight wasn't detected long ago. My first thought was to add some conditionally-compiled debugging code that just performs a no-op traverse of every raw parse tree produced by the grammar. However that doesn't work because raw_expression_tree_walker doesn't promise to support everything, only DML statements. Thoughts? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers