pgsql: Make command-line tools smarter about finding a DB to connect to

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make command-line tools smarter about finding a DB to connect to
Date: 2011-12-06 13:52:15
Message-ID: E1RXvRP-0001fL-S7@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/68281e00540a29e7f9bfc154c25a78b875f560d1

Modified Files
--------------
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 +++++++++++
src/bin/scripts/clusterdb.c | 20 +++++++++++++----
src/bin/scripts/common.c | 42 ++++++++++++++++++++++++++++++++++++++-
src/bin/scripts/common.h | 5 ++++
src/bin/scripts/createdb.c | 19 +++++++++++------
src/bin/scripts/createlang.c | 5 ++-
src/bin/scripts/createuser.c | 3 +-
src/bin/scripts/dropdb.c | 16 ++++++++++----
src/bin/scripts/droplang.c | 5 ++-
src/bin/scripts/dropuser.c | 3 +-
src/bin/scripts/reindexdb.c | 25 ++++++++++++++++------
src/bin/scripts/vacuumdb.c | 20 +++++++++++++----
16 files changed, 188 insertions(+), 36 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-12-06 18:23:30 Re: [COMMITTERS] pgsql: plpython: Add SPI cursor support
Previous Message Magnus Hagander 2011-12-06 10:03:34 pgsql: Add missing documentation for function pg_stat_get_wal_senders()