Postgres 10 and 11 spec for insert says:
ON CONFLICT [ conflict_target ] conflict_action
I have a table:
create table c (
e text not null,
m text not null,
v numeric not null,
PRIMARY KEY (e, m)
)
and I want to do
insert into candle values (...)
on conflict do update set
v = 5
but I get an error:
ON CONFLICT DO UPDATE requires inference specification or constraint name Hint: For example, ON CONFLICT (column_name)
Why do I have to provide a conficting target? How to provide primary key or some other set of columns?