X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=local%2Fpostgresql-user-create;h=902758b3312db8d6627c15a408fa8e7b7770c366;hp=56b37c9e875b88587d4226d21fca026863902bdb;hb=b75d4503ef9c919231c0c02daf5a1ed1e57c73af;hpb=4c57b350e0265cfadb9bbf95cd55ae491ee66820 diff --git a/local/postgresql-user-create b/local/postgresql-user-create index 56b37c9..902758b 100755 --- a/local/postgresql-user-create +++ b/local/postgresql-user-create @@ -1,8 +1,7 @@ #!/bin/sh -eux user="$1" db="${2-}" -sudo -u postgres psql "${db-}" -a -f - <<-EOF - \set ON_ERROR_STOP on +sudo -u postgres psql "${db-}" -a -f - --set ON_ERROR_STOP=1 <<-EOF DO LANGUAGE plpgsql \$\$ BEGIN IF NOT EXISTS (