From 2659215d5ea33e1250309c5a7ce52214ca75be89 Mon Sep 17 00:00:00 2001 From: Jake Sanders Date: Thu, 9 Apr 2020 12:11:24 +0100 Subject: [PATCH] cockroachDB doesn't support this syntax (#1509) --- store/cockroach/cockroach.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/cockroach/cockroach.go b/store/cockroach/cockroach.go index 47038639..e89c5281 100644 --- a/store/cockroach/cockroach.go +++ b/store/cockroach/cockroach.go @@ -277,7 +277,7 @@ func (s *sqlStore) initDB() error { s.readOffset = readOffset write, err := s.db.Prepare(fmt.Sprintf(`INSERT INTO %s.%s(key, value, expiry) VALUES ($1, $2::bytea, $3) - ON CONFLICT ON CONSTRAINT %s_pkey + ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value, expiry = EXCLUDED.expiry;`, s.database, s.table, s.table)) if err != nil {