From 095599398a7fe3f266d992eefc0d96f3ebc2bbcb Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 22 Jan 2021 13:28:48 +0000 Subject: [PATCH] Do the same as SQLite --- syncapi/storage/postgres/output_room_events_topology_table.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/syncapi/storage/postgres/output_room_events_topology_table.go b/syncapi/storage/postgres/output_room_events_topology_table.go index 96cae6cad..809fa7e3a 100644 --- a/syncapi/storage/postgres/output_room_events_topology_table.go +++ b/syncapi/storage/postgres/output_room_events_topology_table.go @@ -44,8 +44,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS syncapi_event_topological_position_idx ON sync const insertEventInTopologySQL = "" + "INSERT INTO syncapi_output_room_events_topology (event_id, topological_position, room_id, stream_position)" + " VALUES ($1, $2, $3, $4)" + - " ON CONFLICT (topological_position, stream_position, room_id) DO UPDATE SET event_id = $1" + - " ON CONFLICT (event_id) DO NOTHING" + + " ON CONFLICT DO NOTHING" + " RETURNING topological_position" const selectEventIDsInRangeASCSQL = "" +