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

From Peter Geoghegan
Subject Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
Date
Msg-id CAM3SWZTuzNykt0gz=mdG9e5hVXvBC-JocKfEuEbU7SvRKH8B6Q@mail.gmail.com
Whole thread Raw
Responses Re: Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
List pgsql-hackers
On Sat, May 21, 2016 at 5:03 PM, Peter Geoghegan <pg@heroku.com> wrote:
> 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).

Attached patch fixes this issue by adding the appropriate
raw_expression_tree_walker handler. This isn't the first quasi-utility
node to need such a handler, so the fix is simple.


--
Peter Geoghegan

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Changed SRF in targetlist handling
Next
From: David Fetter
Date:
Subject: Re: Changed SRF in targetlist handling