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:
@ -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
|
||||
|
Reference in New Issue
Block a user