mirror of https://github.com/zulip/zulip.git
postgresql-init-dev-db: Fix string quotes.
The previous version of the script did not quote VAGRANTUSERNAME, which caused an error when running the script if the username contained `-` or other characters that affect the Postgres syntax. Fix this using double-quotes.
This commit is contained in:
parent
684101353f
commit
59996ff353
|
@ -75,12 +75,12 @@ ALTER USER $USERNAME CREATEDB;
|
|||
ALTER ROLE $USERNAME SET search_path TO $SEARCH_PATH;
|
||||
|
||||
DO \$\$BEGIN
|
||||
CREATE USER $VAGRANTUSERNAME;
|
||||
CREATE USER "$VAGRANTUSERNAME";
|
||||
EXCEPTION WHEN duplicate_object THEN
|
||||
RAISE NOTICE '$VAGRANTUSERNAME user already exists';
|
||||
END\$\$;
|
||||
GRANT $USERNAME TO $VAGRANTUSERNAME;
|
||||
ALTER ROLE $VAGRANTUSERNAME SET search_path TO $SEARCH_PATH;
|
||||
GRANT $USERNAME TO "$VAGRANTUSERNAME";
|
||||
ALTER ROLE "$VAGRANTUSERNAME" SET search_path TO $SEARCH_PATH;
|
||||
EOF
|
||||
|
||||
umask go-rw
|
||||
|
|
Loading…
Reference in New Issue