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 = "" +