diff options
Diffstat (limited to 'src/bin/scripts')
-rw-r--r-- | src/bin/scripts/clusterdb | 6 | ||||
-rw-r--r-- | src/bin/scripts/createdb.c | 6 | ||||
-rw-r--r-- | src/bin/scripts/createlang.c | 4 | ||||
-rw-r--r-- | src/bin/scripts/createuser.c | 4 | ||||
-rw-r--r-- | src/bin/scripts/dropdb.c | 4 | ||||
-rw-r--r-- | src/bin/scripts/droplang.c | 5 | ||||
-rw-r--r-- | src/bin/scripts/dropuser.c | 4 | ||||
-rw-r--r-- | src/bin/scripts/vacuumdb | 4 |
8 files changed, 18 insertions, 19 deletions
diff --git a/src/bin/scripts/clusterdb b/src/bin/scripts/clusterdb index 35329531040..f35393f96bb 100644 --- a/src/bin/scripts/clusterdb +++ b/src/bin/scripts/clusterdb @@ -11,7 +11,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.10 2003/03/20 18:53:18 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.11 2003/05/14 03:26:03 tgl Exp $ # #------------------------------------------------------------------------- @@ -157,10 +157,10 @@ for db in $dbname do [ "$alldb" ] && echo "Clustering $db" if [ -z "$table" ]; then - ${PATHNAME}psql $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';CLUSTER" -d $db + ${PATHNAME}psql $PSQLOPT $ECHOOPT -c "CLUSTER" -d $db [ "$?" -ne 0 ] && exit 1 else - ${PATHNAME}psql $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';CLUSTER $table" -d $db + ${PATHNAME}psql $PSQLOPT $ECHOOPT -c "CLUSTER $table" -d $db [ "$?" -ne 0 ] && exit 1 fi done diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c index 084bebbdd51..372ee922aa2 100644 --- a/src/bin/scripts/createdb.c +++ b/src/bin/scripts/createdb.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/scripts/createdb.c,v 1.1 2003/03/18 22:19:46 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/scripts/createdb.c,v 1.2 2003/05/14 03:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -143,7 +143,7 @@ main(int argc, char *argv[]) initPQExpBuffer(&sql); - appendPQExpBuffer(&sql, "SET autocommit TO on;\nCREATE DATABASE %s", + appendPQExpBuffer(&sql, "CREATE DATABASE %s", fmtId(dbname)); if (owner) @@ -181,7 +181,7 @@ main(int argc, char *argv[]) if (comment) { - printfPQExpBuffer(&sql, "SET autocommit TO on;\nCOMMENT ON DATABASE %s IS ", fmtId(dbname)); + printfPQExpBuffer(&sql, "COMMENT ON DATABASE %s IS ", fmtId(dbname)); appendStringLiteral(&sql, comment, false); appendPQExpBuffer(&sql, ";\n"); diff --git a/src/bin/scripts/createlang.c b/src/bin/scripts/createlang.c index ad562c7eb2b..6ce9e8b1678 100644 --- a/src/bin/scripts/createlang.c +++ b/src/bin/scripts/createlang.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/scripts/createlang.c,v 1.1 2003/03/18 22:19:46 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/scripts/createlang.c,v 1.2 2003/05/14 03:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -237,7 +237,7 @@ main(int argc, char *argv[]) /* * Create the call handler and the language */ - printfPQExpBuffer(&sql, "SET autocommit TO on;\n"); + resetPQExpBuffer(&sql); if (!handlerexists) appendPQExpBuffer(&sql, diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index c67aebf9e26..e58952977dc 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/scripts/createuser.c,v 1.1 2003/03/18 22:19:46 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/scripts/createuser.c,v 1.2 2003/05/14 03:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -185,7 +185,7 @@ main(int argc, char *argv[]) initPQExpBuffer(&sql); - printfPQExpBuffer(&sql, "SET autocommit TO on;\nCREATE USER %s", fmtId(newuser)); + printfPQExpBuffer(&sql, "CREATE USER %s", fmtId(newuser)); if (sysid) appendPQExpBuffer(&sql, " SYSID %s", sysid); if (encrypted == +1) diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c index 784c7c252da..796930c4159 100644 --- a/src/bin/scripts/dropdb.c +++ b/src/bin/scripts/dropdb.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/scripts/dropdb.c,v 1.1 2003/03/18 22:19:46 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/scripts/dropdb.c,v 1.2 2003/05/14 03:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -113,7 +113,7 @@ main(int argc, char *argv[]) initPQExpBuffer(&sql); - appendPQExpBuffer(&sql, "SET autocommit TO on;\nDROP DATABASE %s;\n", + appendPQExpBuffer(&sql, "DROP DATABASE %s;\n", fmtId(dbname)); conn = connectDatabase("template1", host, port, username, password, progname); diff --git a/src/bin/scripts/droplang.c b/src/bin/scripts/droplang.c index 3b9701d6e0a..d62ff24c1c5 100644 --- a/src/bin/scripts/droplang.c +++ b/src/bin/scripts/droplang.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/scripts/droplang.c,v 1.1 2003/03/18 22:19:47 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/scripts/droplang.c,v 1.2 2003/05/14 03:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -215,8 +215,7 @@ main(int argc, char *argv[]) /* * Drop the language */ - printfPQExpBuffer(&sql, "SET autocommit TO on;\n"); - appendPQExpBuffer(&sql, "DROP LANGUAGE \"%s\";\n", langname); + printfPQExpBuffer(&sql, "DROP LANGUAGE \"%s\";\n", langname); if (!keephandler) appendPQExpBuffer(&sql, "DROP FUNCTION \"%s\" ();\n", handler); if (echo) diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c index df82f21c1b6..6bc6359cd73 100644 --- a/src/bin/scripts/dropuser.c +++ b/src/bin/scripts/dropuser.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/bin/scripts/dropuser.c,v 1.1 2003/03/18 22:19:47 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/scripts/dropuser.c,v 1.2 2003/05/14 03:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -113,7 +113,7 @@ main(int argc, char *argv[]) } initPQExpBuffer(&sql); - appendPQExpBuffer(&sql, "SET autocommit TO on;\nDROP USER %s;\n", fmtId(dropuser)); + appendPQExpBuffer(&sql, "DROP USER %s;\n", fmtId(dropuser)); conn = connectDatabase("template1", host, port, username, password, progname); diff --git a/src/bin/scripts/vacuumdb b/src/bin/scripts/vacuumdb index 1a0e9114550..f4c07f701e4 100644 --- a/src/bin/scripts/vacuumdb +++ b/src/bin/scripts/vacuumdb @@ -12,7 +12,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.26 2002/10/18 22:05:36 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.27 2003/05/14 03:26:03 tgl Exp $ # #------------------------------------------------------------------------- @@ -172,7 +172,7 @@ fi for db in $dbname do [ "$alldb" -a "$quiet" -ne 1 ] && echo "Vacuuming $db" - ${PATHNAME}psql $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';VACUUM $full $verbose $analyze $table" -d $db + ${PATHNAME}psql $PSQLOPT $ECHOOPT -c "VACUUM $full $verbose $analyze $table" -d $db if [ "$?" -ne 0 ]; then echo "$CMDNAME: vacuum $table $db failed" 1>&2 exit 1 |