From 3be3afc80eaf91243645db27fa69e7a08a65adc9 Mon Sep 17 00:00:00 2001 From: Adam Lamar Date: Wed, 9 Nov 2022 10:41:50 -0700 Subject: [PATCH] Use $5 instead of $2 - 1 --- weed/filer/postgres3/postgres3_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filer/postgres3/postgres3_store.go b/weed/filer/postgres3/postgres3_store.go index df73f724f..43ec9e174 100644 --- a/weed/filer/postgres3/postgres3_store.go +++ b/weed/filer/postgres3/postgres3_store.go @@ -55,7 +55,7 @@ const ( listEntryQueryPattern = `SELECT key, name, isdir, meta FROM ( SELECT key, name, false as isdir, meta FROM "%s" - WHERE prefixes @> $1 AND cardinality(prefixes) < $2 - 1 + WHERE prefixes @> $1 AND cardinality(prefixes) < $5 AND name __COMPARISON__ $3 AND name LIKE $4 ORDER BY key ASC LIMIT $6 ) s1 UNION