Re: BUG #14153: Unrecognized node type error when upsert is present in recursive CTE - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
Date
Msg-id CAM3SWZShRP+B29M81B=3-F68bYWSeSrpgpaZ_cOpA63XasicPQ@mail.gmail.com
Whole thread Raw
In response to BUG #14153: Unrecognized node type error when upsert is present in recursive CTE  (thomas.alton@gmail.com)
List pgsql-bugs
On Sat, May 21, 2016 at 4:28 PM,  <thomas.alton@gmail.com> wrote:
> ERROR:  XX000: unrecognized node type: 920
> LOCATION:  raw_expression_tree_walker, nodeFuncs.c:3410
>
> I expected the query run successfully and return one row with 'a'.

This is clearly a bug.

920 is IndexElem, which can appear in a raw parse tree in 9.5, due to
ON CONFLICT's use of inference reusing what was previously only used
for CREATE INDEX. (It does not make it into the post-parse analysis
tree, though).

RECURSIVE isn't really special. You don't see the bug in the
non-RECURSIVE case because of the differing rules on query name
visibility.

I'll add a fix for this bug to my personal TODO list. It shouldn't be
hard to fix.

--
Peter Geoghegan

pgsql-bugs by date:

Previous
From: thomas.alton@gmail.com
Date:
Subject: BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
Next
From: Charles
Date:
Subject: Re: BUG #14138: Inconsistent rounding behavior in float4 coercion