From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@heroku.com>
Cc: Thomas Alton <thomas.alton@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
Date: Mon, 23 May 2016 15:48:38 -0400
Message-ID: <20096.1464032918@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM3SWZSWjLPn+_T1A_WKZnRe_pcG+KQ7fk8ZFZ1jyJZk0SrjhA@mail.gmail.com>
References: <20160521232802.22598.13537@wrigleys.postgresql.org>
<CAM3SWZShRP+B29M81B=3-F68bYWSeSrpgpaZ_cOpA63XasicPQ@mail.gmail.com>
<CAM3SWZTuzNykt0gz=mdG9e5hVXvBC-JocKfEuEbU7SvRKH8B6Q@mail.gmail.com>
<18383.1464031327@sss.pgh.pa.us>
<CAM3SWZSWjLPn+_T1A_WKZnRe_pcG+KQ7fk8ZFZ1jyJZk0SrjhA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Peter Geoghegan <pg@heroku.com> writes:
> On Mon, May 23, 2016 at 12:22 PM, Tom Lane <tgl@sss.pgh.pa.us> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@heroku.com, thomas.alton@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
In-Reply-To: <20096.1464032918@sss.pgh.pa.us>
References: <20160521232802.22598.13537@wrigleys.postgresql.org> <CAM3SWZShRP+B29M81B=3-F68bYWSeSrpgpaZ_cOpA63XasicPQ@mail.gmail.com> <CAM3SWZTuzNykt0gz=mdG9e5hVXvBC-JocKfEuEbU7SvRKH8B6Q@mail.gmail.com> <18383.1464031327@sss.pgh.pa.us> <CAM3SWZSWjLPn+_T1A_WKZnRe_pcG+KQ7fk8ZFZ1jyJZk0SrjhA@mail.gmail.com> <20096.1464032918@sss.pgh.pa.us>
* 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