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