fix: try to fix psql 🐶

v1.18.x
Baris Usakli 6 years ago
parent 31ccc860d3
commit 2e6b562f1e

@ -107,7 +107,12 @@ SELECT $1::TEXT, v, s
async.apply(helpers.ensureLegacyObjectsType, tx.client, keys, 'zset'),
async.apply(query, {
name: 'sortedSetsAdd',
text: `
text: isArrayOfScores ? `
INSERT INTO "legacy_zset" ("_key", "value", "score")
SELECT k, $2::TEXT, s
FROM UNNEST($1::TEXT[], $3::NUMERIC[]) vs(k, s)
ON CONFLICT ("_key", "value")
DO UPDATE SET "score" = EXCLUDED."score"` : `
INSERT INTO "legacy_zset" ("_key", "value", "score")
SELECT k, $2::TEXT, $3::NUMERIC
FROM UNNEST($1::TEXT[]) k

Loading…
Cancel
Save