From: Bruce Momjian Date: Tue, 13 Feb 2007 18:06:18 +0000 (+0000) Subject: Add code so database scans are done in an order consistent with X-Git-Tag: REL8_3_BETA1~1235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9db80f38d34b63c24fa76e36e1163ee2664d857;p=postgresql Add code so database scans are done in an order consistent with pg_dumpall. --- diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c index 51525d0bba..193eaf781a 100644 --- a/src/bin/scripts/clusterdb.c +++ b/src/bin/scripts/clusterdb.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 2002-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/scripts/clusterdb.c,v 1.15 2007/01/05 22:19:50 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/scripts/clusterdb.c,v 1.16 2007/02/13 18:06:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -208,7 +208,7 @@ cluster_all_databases(const char *host, const char *port, int i; conn = connectDatabase("postgres", host, port, username, password, progname); - result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn;", progname, echo); + result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", progname, echo); PQfinish(conn); for (i = 0; i < PQntuples(result); i++) diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index 96d658065c..057fbd876e 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/scripts/reindexdb.c,v 1.8 2007/01/05 22:19:50 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/scripts/reindexdb.c,v 1.9 2007/02/13 18:06:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -269,7 +269,7 @@ reindex_all_databases(const char *host, const char *port, int i; conn = connectDatabase("postgres", host, port, username, password, progname); - result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn;", progname, echo); + result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", progname, echo); PQfinish(conn); for (i = 0; i < PQntuples(result); i++)