I have next query:
INSERT INTO loger(state, id, event_timestamp, other_event_timestamp)
VALUES
(1, 12, '2020-01-01T19:00:00.000Z', '2020-01-01T19:00:00.000Z'),
(1, 12, '2020-01-01T19:00:00.000Z', '2020-01-01T19:00:00.000Z')
ON CONFLICT(id, event_timestamp) DO UPDATE SET state = excluded.state
During execution it fails with error:
ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time
p.s. these data comes outside, so I should pass it to query as is.