This ensures stdout is kept in sync with messages on stderr.
Per report from Olaf Ferger.
*
* Portions Copyright (c) 2002-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/scripts/clusterdb.c,v 1.4 2003/11/29 19:52:07 pgsql Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/clusterdb.c,v 1.5 2004/01/01 19:27:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#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);
}
-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;
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;
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.6 2003/11/29 19:52:07 pgsql Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.7 2004/01/01 19:27:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PQfinish(conn);
if (!quiet)
+ {
puts("CREATE DATABASE");
+ fflush(stdout);
+ }
if (comment)
{
PQfinish(conn);
if (!quiet)
+ {
puts("COMMENT");
+ fflush(stdout);
+ }
}
exit(0);
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.7 2003/11/29 19:52:07 pgsql Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.8 2004/01/01 19:27:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PQfinish(conn);
if (!quiet)
+ {
puts("CREATE USER");
+ fflush(stdout);
+ }
exit(0);
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/dropdb.c,v 1.7 2003/11/29 19:52:07 pgsql Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/dropdb.c,v 1.8 2004/01/01 19:27:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PQfinish(conn);
if (!quiet)
+ {
puts("DROP DATABASE");
+ fflush(stdout);
+ }
exit(0);
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.6 2003/11/29 19:52:07 pgsql Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.7 2004/01/01 19:27:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PQfinish(conn);
if (!quiet)
+ {
puts("DROP USER");
+ fflush(stdout);
+ }
exit(0);
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.4 2003/11/29 19:52:07 pgsql Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.5 2004/01/01 19:27:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#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);
}
-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;
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;