Allow createdb to create comments in current db, not template1.
authorBruce Momjian <[email protected]>
Tue, 11 Jun 2002 22:21:01 +0000 (22:21 +0000)
committerBruce Momjian <[email protected]>
Tue, 11 Jun 2002 22:21:01 +0000 (22:21 +0000)
src/bin/scripts/createdb

index 91d544f9e00f10a644181ad7695bbe1aab35e710..5d185b62f79cc97762bdfcb32eab491c40f03b36 100644 (file)
@@ -12,7 +12,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.21 2002/04/12 09:37:10 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.22 2002/06/11 22:21:01 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -198,7 +198,7 @@ fi
 
 dbcomment=`echo "$dbcomment" | sed "s/'/\\\\\'/g"`
 
-${PATHNAME}psql $PSQLOPT -d template1 -c "COMMENT ON DATABASE \"$dbname\" IS '$dbcomment'"
+${PATHNAME}psql $PSQLOPT -d "$dbname" -c "COMMENT ON DATABASE \"$dbname\" IS '$dbcomment'"
 if [ "$?" -ne 0 ]; then
    echo "$CMDNAME: comment creation failed (database was created)" 1>&2
    exit 1