From 51b4963e2eaa6caff8ed4702453b9af371cf6914 Mon Sep 17 00:00:00 2001 From: LazyDBA247-Anyvision Date: Sun, 14 Feb 2021 13:14:36 +0200 Subject: postgres2 & memsql2 add escape (quote identifiers) for the dynamic sql so tables (collections) with special characters will work. --- weed/filer/postgres/postgres_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weed/filer/postgres/postgres_store.go') diff --git a/weed/filer/postgres/postgres_store.go b/weed/filer/postgres/postgres_store.go index 27c6278c7..6e0d05315 100644 --- a/weed/filer/postgres/postgres_store.go +++ b/weed/filer/postgres/postgres_store.go @@ -45,7 +45,7 @@ func (store *PostgresStore) initialize(user, password, hostname string, port int store.SupportBucketTable = false store.SqlGenerator = &SqlGenPostgres{ CreateTableSqlTemplate: "", - DropTableSqlTemplate: "drop table %s", + DropTableSqlTemplate: `drop table "%s"`, } sqlUrl := fmt.Sprintf(CONNECTION_URL_PATTERN, hostname, port, sslmode) -- cgit v1.2.3