summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2018-05-01 18:15:28 +0100
committerGitHub <noreply@github.com>2018-05-01 18:15:28 +0100
commitc06932a029780c61007271718652ba610c00dddb (patch)
tree335a718ca1a3d2c7e0cc8d62ebedfac51b2d0743
parentFix python synatx (diff)
parentUse COALESCE rather than IFNULL (diff)
downloadsynapse-c06932a029780c61007271718652ba610c00dddb.tar.xz
Merge pull request #3166 from matrix-org/dbkr/postgres_doesnt_have_ifnull
Use COALESCE rather than IFNULL
-rw-r--r--synapse/storage/profile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py

index 12e2d44406..fcf3af7e5b 100644 --- a/synapse/storage/profile.py +++ b/synapse/storage/profile.py
@@ -88,7 +88,7 @@ class ProfileWorkerStore(SQLBaseStore): def f(txn): sql = ( "UPDATE profiles SET batch = " - "(SELECT IFNULL(MAX(batch), -1) + 1 FROM profiles) " + "(SELECT COALESCE(MAX(batch), -1) + 1 FROM profiles) " "WHERE user_id in (" " SELECT user_id FROM profiles WHERE batch is NULL limit ?" ")"