1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

Add --template option to createdb script to allow access to WITH TEMPLATE

option of CREATE DATABASE.  In pg_regress, create regression database
from template0 to ensure that any installation-local cruft in template1
will not mess up the tests.
This commit is contained in:
Tom Lane
2001-02-18 17:53:55 +00:00
parent 48d03278a2
commit c3b00e7e29
3 changed files with 43 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#! /bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.18 2001/01/19 23:43:36 petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.19 2001/02/18 17:53:55 tgl Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
@ -420,10 +420,12 @@ fi
# ----------
# Create the regression database
# We use template0 so that any installation-local cruft in template1
# will not mess up the tests.
# ----------
message "creating database \"$dbname\""
"$bindir/createdb" $encoding_opt $psql_options "$dbname"
"$bindir/createdb" $encoding_opt $psql_options --template template0 "$dbname"
if [ $? -ne 0 ]; then
echo "$me: createdb failed"
(exit 2); exit