Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
Дата
Msg-id CAM3SWZTuzNykt0gz=mdG9e5hVXvBC-JocKfEuEbU7SvRKH8B6Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Changed SRF in targetlist handling
Следующее
От: David Fetter
Дата:
Сообщение: Re: Changed SRF in targetlist handling