Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types
Дата
Msg-id 55C1C20C.2050502@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On 2015-08-05 AM 06:44, Peter Geoghegan wrote:
> On Tue, Aug 4, 2015 at 2:29 AM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> Perhaps, it may have to do with how EXCLUDED pseudo-rel's targetlist is
>> manipulated through parse-plan stage?
>
> I think so, yes.
>
> I'll look into writing a fix for this later in the week.
>

Just a heads-up.

I forgot mentioning one thing later yesterday. The way exclRelTlist is
initialized, all the way in the beginning (transformOnConflictClause), is
most probably to blame. It uses expandRelAttrs() for other valid reasons;
but within it, expandRTE() is called with 'false' for include_dropped
(columns). I applied the attached (perhaps ugly) fix, and it seemed to fix
the issue. But, I guess you'll be able to come up with some better fix.

Thanks,
Amit

Вложения

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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Dependency between bgw_notify_pid and bgw_flags
Следующее
От: Robert Abraham
Дата:
Сообщение: Patch for ginCombineData