diff --git a/scripts/setup/create-db.sql b/scripts/setup/create-db.sql index 33ccfaf60f..96ff54e0ac 100644 --- a/scripts/setup/create-db.sql +++ b/scripts/setup/create-db.sql @@ -1,3 +1,8 @@ +\set dbuser :dbuser +SELECT CASE WHEN :'dbuser' = ':dbuser' THEN 'zulip' ELSE :'dbuser' END AS dbuser \gset +\set dbname :dbname +SELECT CASE WHEN :'dbname' = ':dbname' THEN 'zulip' ELSE :'dbname' END AS dbname \gset + \connect postgres DROP DATABASE IF EXISTS :"dbname"; SELECT format($$BEGIN