From a68c45e1f2d9593797a9c390fdbc2ae5b8573d56 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 10 Dec 2018 15:49:09 +0100 Subject: [PATCH] new: [postres] support user with dots in their name --- postgres/lib/common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/lib/common b/postgres/lib/common index b2cac81c..d78c2597 100644 --- a/postgres/lib/common +++ b/postgres/lib/common @@ -81,13 +81,13 @@ db_has_user() { db_create_user() { local user="$1" password="$2" ## Using this instead of pipes is important so that trap works - ddb < <(echo "CREATE USER $user WITH PASSWORD '$password' CREATEDB NOCREATEROLE;") + ddb < <(echo "CREATE USER \"$user\" WITH PASSWORD '$password' CREATEDB NOCREATEROLE;") } db_change_password() { local user="$1" password="$2" ## Using this instead of pipes is important so that trap works - ddb < <(echo "ALTER USER $user WITH PASSWORD '$password';") + ddb < <(echo "ALTER USER \"$user\" WITH PASSWORD '$password';") }