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

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
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-10 22:37:33
Message-ID: CAM3SWZRWU9UETXOEP-AYTb=EkPhiqCrFx0eTbRQ8M0iSpeTzpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 5, 2015 at 12:58 AM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> 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 for working on this. I think you have this right, but I also
don't think we should discuss this fix outside of the context of a
wider discussion about the excluded targetlist.

What I'm going to do is roll this into my own pending patch to fix the
issue with wholerow vars, which is also down to a problem with the
excluded targetlist initially generated by calling expandRelAttrs().
Andres might want to take an alternative approach with that, so a
consolidation makes sense.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2015-08-10 23:03:36 Re: [patch] A \pivot command for psql
Previous Message Andrew Dunstan 2015-08-10 21:52:15 Re: tap tests remove working directories