|
|
@ -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';") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|