aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/scripts/clusterdb.c29
-rw-r--r--src/bin/scripts/createdb.c8
-rw-r--r--src/bin/scripts/createuser.c5
-rw-r--r--src/bin/scripts/dropdb.c5
-rw-r--r--src/bin/scripts/dropuser.c5
-rw-r--r--src/bin/scripts/vacuumdb.c35
6 files changed, 55 insertions, 32 deletions
diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c
index cd91ad0cb77..72161969d82 100644
--- a/src/bin/scripts/clusterdb.c
+++ b/src/bin/scripts/clusterdb.c
@@ -4,7 +4,7 @@
*
* Portions Copyright (c) 2002-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/clusterdb.c,v 1.3 2003/08/04 00:43:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/clusterdb.c,v 1.3.4.1 2004/01/01 19:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,14 +14,14 @@
#include "dumputils.h"
-static
-void
+static void
cluster_one_database(const char *dbname, const char *table,
- const char *host, const char *port, const char *username, bool password,
+ const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet);
-static
-void
-cluster_all_databases(const char *host, const char *port, const char *username, bool password,
+static void
+cluster_all_databases(const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet);
static void help(const char *progname);
@@ -151,10 +151,10 @@ main(int argc, char *argv[])
}
-static
-void
+static void
cluster_one_database(const char *dbname, const char *table,
- const char *host, const char *port, const char *username, bool password,
+ const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet)
{
PQExpBufferData sql;
@@ -192,13 +192,16 @@ cluster_one_database(const char *dbname, const char *table,
termPQExpBuffer(&sql);
if (!quiet)
+ {
puts("CLUSTER");
+ fflush(stdout);
+ }
}
-static
-void
-cluster_all_databases(const char *host, const char *port, const char *username, bool password,
+static void
+cluster_all_databases(const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet)
{
PGconn *conn;
diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c
index 1f7df9104d5..3fff43eeef7 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.5 2003/08/04 00:43:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/createdb.c,v 1.5.4.1 2004/01/01 19:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -177,7 +177,10 @@ main(int argc, char *argv[])
PQfinish(conn);
if (!quiet)
+ {
puts("CREATE DATABASE");
+ fflush(stdout);
+ }
if (comment)
{
@@ -200,7 +203,10 @@ main(int argc, char *argv[])
PQfinish(conn);
if (!quiet)
+ {
puts("COMMENT");
+ fflush(stdout);
+ }
}
exit(0);
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index f113456fbca..091cf47cd36 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.6 2003/08/04 00:43:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/createuser.c,v 1.6.4.1 2004/01/01 19:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -224,7 +224,10 @@ main(int argc, char *argv[])
PQfinish(conn);
if (!quiet)
+ {
puts("CREATE USER");
+ fflush(stdout);
+ }
exit(0);
}
diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c
index 5e53defd6b3..2b90fb2e407 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.6 2003/08/04 00:43:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/dropdb.c,v 1.6.4.1 2004/01/01 19:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -131,7 +131,10 @@ main(int argc, char *argv[])
PQfinish(conn);
if (!quiet)
+ {
puts("DROP DATABASE");
+ fflush(stdout);
+ }
exit(0);
}
diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c
index 06472a800d7..23f8134fac7 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.5 2003/07/23 08:47:41 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/dropuser.c,v 1.5.4.1 2004/01/01 19:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -131,7 +131,10 @@ main(int argc, char *argv[])
PQfinish(conn);
if (!quiet)
+ {
puts("DROP USER");
+ fflush(stdout);
+ }
exit(0);
}
diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c
index 2d17be40d1b..468a7fb1104 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.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/vacuumdb.c,v 1.3 2003/08/04 00:43:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/vacuumdb.c,v 1.3.4.1 2004/01/01 19:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,15 +14,16 @@
#include "common.h"
-static
-void
-vacuum_one_database(const char *dbname, bool full, bool verbose, bool analyze, const char *table,
- const char *host, const char *port, const char *username, bool password,
+static void
+vacuum_one_database(const char *dbname, bool full, bool verbose, bool analyze,
+ const char *table,
+ const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet);
-static
-void
+static void
vacuum_all_databases(bool full, bool verbose, bool analyze,
- const char *host, const char *port, const char *username, bool password,
+ const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet);
static void help(const char *progname);
@@ -168,10 +169,11 @@ main(int argc, char *argv[])
}
-static
-void
-vacuum_one_database(const char *dbname, bool full, bool verbose, bool analyze, const char *table,
- const char *host, const char *port, const char *username, bool password,
+static void
+vacuum_one_database(const char *dbname, bool full, bool verbose, bool analyze,
+ const char *table,
+ const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet)
{
PQExpBufferData sql;
@@ -215,14 +217,17 @@ vacuum_one_database(const char *dbname, bool full, bool verbose, bool analyze, c
termPQExpBuffer(&sql);
if (!quiet)
+ {
puts("VACUUM");
+ fflush(stdout);
+ }
}
-static
-void
+static void
vacuum_all_databases(bool full, bool verbose, bool analyze,
- const char *host, const char *port, const char *username, bool password,
+ const char *host, const char *port,
+ const char *username, bool password,
const char *progname, bool echo, bool quiet)
{
PGconn *conn;