aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/postgres2/postgres2_store.go
diff options
context:
space:
mode:
authorLazyDBA247-Anyvision <yonin@anyvision.co>2021-02-14 13:14:36 +0200
committerLazyDBA247-Anyvision <yonin@anyvision.co>2021-02-14 13:14:36 +0200
commit51b4963e2eaa6caff8ed4702453b9af371cf6914 (patch)
treec557e1515886185c5dbb0bffb9b7bec43a565174 /weed/filer/postgres2/postgres2_store.go
parent876dbe3d26138c26e0e9869874c0d0b18aec7d1e (diff)
downloadseaweedfs-51b4963e2eaa6caff8ed4702453b9af371cf6914.tar.xz
seaweedfs-51b4963e2eaa6caff8ed4702453b9af371cf6914.zip
postgres2 & memsql2
add escape (quote identifiers) for the dynamic sql so tables (collections) with special characters will work.
Diffstat (limited to 'weed/filer/postgres2/postgres2_store.go')
-rw-r--r--weed/filer/postgres2/postgres2_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/filer/postgres2/postgres2_store.go b/weed/filer/postgres2/postgres2_store.go
index 82552376f..94c760401 100644
--- a/weed/filer/postgres2/postgres2_store.go
+++ b/weed/filer/postgres2/postgres2_store.go
@@ -48,7 +48,7 @@ func (store *PostgresStore2) initialize(createTable, user, password, hostname st
store.SupportBucketTable = true
store.SqlGenerator = &postgres.SqlGenPostgres{
CreateTableSqlTemplate: createTable,
- DropTableSqlTemplate: "drop table %s",
+ DropTableSqlTemplate: `drop table "%s"`,
}
sqlUrl := fmt.Sprintf(CONNECTION_URL_PATTERN, hostname, port, sslmode)