On Wed, Jan 6, 2016 at 10:48 AM, Nicolas ALBEZA <n(dot)albeza(at)gmail(dot)com> wrote:
> Hello,
>
> Is there any way for a client to know if a conflict happened in an ON
> CONFLICT DO UPDATE query ?
Here is one way:
create table foo (x int primary key, y text);
insert into foo values (3,'insert') on conflict (x) do update set
y='update' returning y;
I don't know how to do it without leaving an extra column of cruft
behind in the table.
Cheers,
Jeff