Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types - Mailing list pgsql-hackers

From Andres Freund
Subject Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types
Date
Msg-id 20151003131856.GC5801@alap3.anarazel.de
Whole thread Raw
In response to ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers
Hi,

> db=# INSERT INTO brokentab(id, k1,k2,k3,k4,k5,k6,k7, smallval) VALUES
> (5,0,0,0,1,0,1,0, 0) ON CONFLICT (id, k1,k2,k3,k4,k5,k6,k7) DO UPDATE SET
> smallval=EXCLUDED.smallval;
> ERROR:  attribute 29 has wrong type
> DETAIL:  Table has type integer, but query expects smallint.

I pushed a fix for the issue. Could you verify that your original
problem does not exist anymore?

Thanks for testing Geoff, thanks for helping to nail this down Amit and
Peter.

Regards,

Andres



pgsql-hackers by date:

Previous
From: Amir Rohan
Date:
Subject: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Next
From: Andres Freund
Date:
Subject: Re: Why can't we used CAPITAL LETTERS into replication slot_name?