diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-05-27 00:00:11 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-05-27 00:00:11 -0700 |
| commit | f124ebab1dd305687d897b50760647088a5d7985 (patch) | |
| tree | 42bb90c3284e5c0506454ccf5cf0547db00f24c8 /weed/filer2/postgres/postgres_store.go | |
| parent | 1c0a2a7db82c2f327cf06d19feb2e4bcf05f6262 (diff) | |
| download | seaweedfs-f124ebab1dd305687d897b50760647088a5d7985.tar.xz seaweedfs-f124ebab1dd305687d897b50760647088a5d7985.zip | |
fix ordering
Diffstat (limited to 'weed/filer2/postgres/postgres_store.go')
| -rw-r--r-- | weed/filer2/postgres/postgres_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer2/postgres/postgres_store.go b/weed/filer2/postgres/postgres_store.go index 387b8f58d..19d97b443 100644 --- a/weed/filer2/postgres/postgres_store.go +++ b/weed/filer2/postgres/postgres_store.go @@ -45,8 +45,8 @@ func (store *PostgresStore) initialize(user, password, hostname string, port int store.SqlUpdate = "UPDATE filemeta SET meta=$1 WHERE dirhash=$2 AND name=$3 AND directory=$4" 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.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 LIMIT $4" - store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 LIMIT $4" + store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 ORDER BY NAME ASC LIMIT $4" + store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 ORDER BY NAME ASC LIMIT $4" sqlUrl := fmt.Sprintf(CONNECTION_URL_PATTERN, hostname, port, user, password, database, sslmode) var dbErr error |
