| From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
|---|---|
| To: | Peter Geoghegan <pg(at)heroku(dot)com> |
| Cc: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types |
| Date: | 2015-08-05 07:58:04 |
| Message-ID: | 55C1C20C.2050502@lab.ntt.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)lab(dot)ntt(dot)co(dot)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
| Attachment | Content-Type | Size |
|---|---|---|
| upsert-excltlist-include-dropped-cols.patch | text/x-diff | 3.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Abraham | 2015-08-05 10:17:50 | Patch for ginCombineData |
| Previous Message | Ashutosh Bapat | 2015-08-05 07:33:25 | Re: Dependency between bgw_notify_pid and bgw_flags |