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.
Showing
- doc/src/sgml/ref/clusterdb.sgml 12 additions, 0 deletionsdoc/src/sgml/ref/clusterdb.sgml
- doc/src/sgml/ref/createdb.sgml 13 additions, 0 deletionsdoc/src/sgml/ref/createdb.sgml
- doc/src/sgml/ref/dropdb.sgml 12 additions, 0 deletionsdoc/src/sgml/ref/dropdb.sgml
- doc/src/sgml/ref/reindexdb.sgml 12 additions, 0 deletionsdoc/src/sgml/ref/reindexdb.sgml
- doc/src/sgml/ref/vacuumdb.sgml 12 additions, 0 deletionsdoc/src/sgml/ref/vacuumdb.sgml
- src/bin/scripts/clusterdb.c 15 additions, 5 deletionssrc/bin/scripts/clusterdb.c
- src/bin/scripts/common.c 41 additions, 1 deletionsrc/bin/scripts/common.c
- src/bin/scripts/common.h 5 additions, 0 deletionssrc/bin/scripts/common.h
- src/bin/scripts/createdb.c 12 additions, 7 deletionssrc/bin/scripts/createdb.c
- src/bin/scripts/createlang.c 3 additions, 2 deletionssrc/bin/scripts/createlang.c
- src/bin/scripts/createuser.c 2 additions, 1 deletionsrc/bin/scripts/createuser.c
- src/bin/scripts/dropdb.c 11 additions, 5 deletionssrc/bin/scripts/dropdb.c
- src/bin/scripts/droplang.c 3 additions, 2 deletionssrc/bin/scripts/droplang.c
- src/bin/scripts/dropuser.c 2 additions, 1 deletionsrc/bin/scripts/dropuser.c
- src/bin/scripts/reindexdb.c 18 additions, 7 deletionssrc/bin/scripts/reindexdb.c
- src/bin/scripts/vacuumdb.c 15 additions, 5 deletionssrc/bin/scripts/vacuumdb.c
Loading
Please register or sign in to comment