From d823ee478b4d9e1f435f2c8d7201c70bbafe270e Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Jun 2020 17:56:11 +0100 Subject: [PATCH] Fix pq query --- roomserver/storage/postgres/published_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roomserver/storage/postgres/published_table.go b/roomserver/storage/postgres/published_table.go index 55df2ef28..4f0ebf0a2 100644 --- a/roomserver/storage/postgres/published_table.go +++ b/roomserver/storage/postgres/published_table.go @@ -35,7 +35,7 @@ CREATE TABLE IF NOT EXISTS roomserver_published ( const upsertPublishedSQL = "" + "INSERT INTO roomserver_published (room_id, published) VALUES ($1, $2) " + - "ON CONFLICT room_id DO UPDATE SET published=$2" + "ON CONFLICT (room_id) DO UPDATE SET published=$2" const selectAllPublishedSQL = "" + "SELECT room_id FROM roomserver_published WHERE published = $1"