aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-12-06 08:48:15 -0500
committerRobert Haas <rhaas@postgresql.org>2011-12-06 08:48:15 -0500
commit68281e00540a29e7f9bfc154c25a78b875f560d1 (patch)
treeedd65f9661d0efcdc11780cea0466c1f8aeb6715 /doc/src
parent6ef4ae1d4e829675c332c39895fdf90e15c3faeb (diff)
downloadpostgresql-68281e00540a29e7f9bfc154c25a78b875f560d1.tar.gz
postgresql-68281e00540a29e7f9bfc154c25a78b875f560d1.zip
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.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/clusterdb.sgml12
-rw-r--r--doc/src/sgml/ref/createdb.sgml13
-rw-r--r--doc/src/sgml/ref/dropdb.sgml12
-rw-r--r--doc/src/sgml/ref/reindexdb.sgml12
-rw-r--r--doc/src/sgml/ref/vacuumdb.sgml12
5 files changed, 61 insertions, 0 deletions
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
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term>
+ <listitem>
+ <para>
+ Specifies the name of the database to connect to discover what other
+ databases should be clustered. If not specified, the
+ <literal>postgres</literal> database will be used,
+ and if that does not exist, <literal>template1</literal> will be used.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
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
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term>
+ <listitem>
+ <para>
+ Specifies the name of the database to connect to when creating the
+ new database. If not specified, the <literal>postgres</literal>
+ database will be used; if that does not exist (or if it is the name
+ of the new database being created), <literal>template1</literal> will
+ be used.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
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
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term>
+ <listitem>
+ <para>
+ Specifies the name of the database to connect to in order to drop the
+ target database. If not specified, the <literal>postgres</literal>
+ database will be used; if that does not exist (or is the database
+ being dropped), <literal>template1</literal> will be used.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
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
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term>
+ <listitem>
+ <para>
+ Specifies the name of the database to connect to discover what other
+ databases should be vacuumed. If not specified, the
+ <literal>postgres</literal> database will be used,
+ and if that does not exist, <literal>template1</literal> will be used.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
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
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term>
+ <listitem>
+ <para>
+ Specifies the name of the database to connect to discover what other
+ databases should be vacuumed. If not specified, the
+ <literal>postgres</literal> database will be used,
+ and if that does not exist, <literal>template1</literal> will be used.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>