aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/postgres/postgres_store.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-09-17 10:29:32 +0800
committerGitHub <noreply@github.com>2020-09-17 10:29:32 +0800
commitf71f7fcf99ba6d64bfa49fd7411e06bdc2b9d591 (patch)
treee0e98625edaab040eed21fd1a8b277f2c0546ad3 /weed/filer/postgres/postgres_store.go
parent23baa3c36ce468a36d89abae59f4411cdc446043 (diff)
parent5eee4983f36f55a2a01381e8af278b28919dbe90 (diff)
downloadseaweedfs-f71f7fcf99ba6d64bfa49fd7411e06bdc2b9d591.tar.xz
seaweedfs-f71f7fcf99ba6d64bfa49fd7411e06bdc2b9d591.zip
Merge pull request #15 from chrislusf/master
sync
Diffstat (limited to 'weed/filer/postgres/postgres_store.go')
-rw-r--r--weed/filer/postgres/postgres_store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer/postgres/postgres_store.go b/weed/filer/postgres/postgres_store.go
index 4544c8416..c41700d17 100644
--- a/weed/filer/postgres/postgres_store.go
+++ b/weed/filer/postgres/postgres_store.go
@@ -46,8 +46,8 @@ func (store *PostgresStore) initialize(user, password, hostname string, port int
store.SqlFind = "SELECT meta FROM filemeta WHERE dirhash=$1 AND name=$2 AND directory=$3"
store.SqlDelete = "DELETE FROM filemeta WHERE dirhash=$1 AND name=$2 AND directory=$3"
store.SqlDeleteFolderChildren = "DELETE FROM filemeta WHERE dirhash=$1 AND directory=$2"
- store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 AND name like CONCAT($4,'%')ORDER BY NAME ASC LIMIT $5"
- store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 AND name like CONCAT($4,'%') ORDER BY NAME ASC LIMIT $5"
+ store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 AND name like $4 ORDER BY NAME ASC LIMIT $5"
+ store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 AND name like $4 ORDER BY NAME ASC LIMIT $5"
sqlUrl := fmt.Sprintf(CONNECTION_URL_PATTERN, hostname, port, user, sslmode)
if password != "" {