scripts: Always use ON_ERROR_STOP=1 when running psql.

Also use psql -e (--echo-queries) in scripts that use ‘set -x’, so
errors can be traced to a specific query from the output.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-04-01 16:00:57 -07:00
committed by Tim Abbott
parent efd22fd2ae
commit 5290519a62
9 changed files with 18 additions and 17 deletions

View File

@@ -17,7 +17,7 @@ GRANT USAGE ON SCHEMA pgroonga TO zulip;
"
if [ -f /.dockerenv ]; then
echo "$DATABASE_CREATE" | psql
echo "$DATABASE_CREATE" | psql -v ON_ERROR_STOP=1 -e
else
echo "$DATABASE_CREATE" | su postgres -c psql
echo "$DATABASE_CREATE" | su postgres -c 'psql -v ON_ERROR_STOP=1 -e'
fi