Skip site navigation (1) Skip section navigation (2)

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

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 connectto
Date: 2011-12-06 13:52:15
Message-ID: E1RXvRP-0001fL-S7@gemulon.postgresql.org (view raw or flat)
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(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2011-12-06 18:23:30
Subject: Re: [COMMITTERS] pgsql: plpython: Add SPI cursor support
Previous:From: Magnus HaganderDate: 2011-12-06 10:03:34
Subject: pgsql: Add missing documentation for functionpg_stat_get_wal_senders()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group