From 68281e00540a29e7f9bfc154c25a78b875f560d1 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 6 Dec 2011 08:48:15 -0500 Subject: Make command-line tools smarter about finding a DB to connect to. If unable to connect to "postgres", try "template1". This allows things to work more smoothly in the case where the postgres database has been dropped. And just in case that's not good enough, also allow the user to specify a maintenance database to be used for the initial connection, to cover the case where neither postgres nor template1 is suitable. --- doc/src/sgml/ref/clusterdb.sgml | 12 ++++++++++++ doc/src/sgml/ref/createdb.sgml | 13 +++++++++++++ doc/src/sgml/ref/dropdb.sgml | 12 ++++++++++++ doc/src/sgml/ref/reindexdb.sgml | 12 ++++++++++++ doc/src/sgml/ref/vacuumdb.sgml | 12 ++++++++++++ 5 files changed, 61 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/clusterdb.sgml b/doc/src/sgml/ref/clusterdb.sgml index c80cbac5173..1573145b923 100644 --- a/doc/src/sgml/ref/clusterdb.sgml +++ b/doc/src/sgml/ref/clusterdb.sgml @@ -229,6 +229,18 @@ PostgreSQL documentation + + + + + + Specifies the name of the database to connect to discover what other + databases should be clustered. If not specified, the + postgres database will be used, + and if that does not exist, template1 will be used. + + + diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index 1516f3396d6..cbbc5c05455 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -276,6 +276,19 @@ PostgreSQL documentation + + + + + + Specifies the name of the database to connect to when creating the + new database. If not specified, the postgres + database will be used; if that does not exist (or if it is the name + of the new database being created), template1 will + be used. + + + diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml index aedfa580751..ba781cce52b 100644 --- a/doc/src/sgml/ref/dropdb.sgml +++ b/doc/src/sgml/ref/dropdb.sgml @@ -196,6 +196,18 @@ PostgreSQL documentation + + + + + + Specifies the name of the database to connect to in order to drop the + target database. If not specified, the postgres + database will be used; if that does not exist (or is the database + being dropped), template1 will be used. + + + diff --git a/doc/src/sgml/ref/reindexdb.sgml b/doc/src/sgml/ref/reindexdb.sgml index 7b0263c5a1c..9caaa952668 100644 --- a/doc/src/sgml/ref/reindexdb.sgml +++ b/doc/src/sgml/ref/reindexdb.sgml @@ -243,6 +243,18 @@ PostgreSQL documentation + + + + + + Specifies the name of the database to connect to discover what other + databases should be vacuumed. If not specified, the + postgres database will be used, + and if that does not exist, template1 will be used. + + + diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index 4effa4188a6..89d634747dd 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -284,6 +284,18 @@ PostgreSQL documentation + + + + + + Specifies the name of the database to connect to discover what other + databases should be vacuumed. If not specified, the + postgres database will be used, + and if that does not exist, template1 will be used. + + + -- cgit v1.2.3