create-db: Default dbuser and dbname to zulip.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-05-26 16:49:03 -07:00 committed by Anders Kaseorg
parent 832c763c38
commit cb8d9a1f8a
1 changed files with 5 additions and 0 deletions

View File

@ -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