From 42255e0b020923e3564c289ec17f6a1017f2052d Mon Sep 17 00:00:00 2001 From: clinton_admin Date: Sun, 25 Mar 2012 03:13:23 -0400 Subject: [PATCH] Escape tablespace name when creating postgresql tablespace * Previously, a name with a '-' would break things * Usernames containing '"' are invalid anyway so we should be bulletproof --- create-user-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create-user-database b/create-user-database index cf855c4..bc2ca60 100755 --- a/create-user-database +++ b/create-user-database @@ -16,7 +16,7 @@ MYSQLDIR=$DBPATH/mysql if ! test -d $PGDIR; then mkdir -p $PGDIR chown postgres:postgres $PGDIR - sudo -u postgres psql -c "CREATE TABLESPACE user_$USER OWNER postgres LOCATION '$PGDIR'" template1 + sudo -u postgres psql -c "CREATE TABLESPACE \"user_$USER\" OWNER postgres LOCATION '$PGDIR'" template1 fi # Create mysql user and databases placeholder within volume -- 2.20.1