mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Please find enclosed a patch that lets you use \c to connect
(optionally) to a new host and port without exiting psql. This eliminates, IMHO, a surprise in that you can now connect to PostgreSQL on a differnt machine from the one where you started your session. This should help people who use psql as an administrative tool. David Fetter
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.107 2006/02/11 21:55:35 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.108 2006/02/12 02:54:30 momjian Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
#include "common.h"
|
||||
@ -173,7 +173,7 @@ slashUsage(unsigned short int pager)
|
||||
* in 80 columns >> "
|
||||
*/
|
||||
fprintf(output, _("General\n"));
|
||||
fprintf(output, _(" \\c[onnect] [DBNAME|- [USER]]\n"
|
||||
fprintf(output, _(" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
|
||||
" connect to new database (currently \"%s\")\n"),
|
||||
PQdb(pset.db));
|
||||
fprintf(output, _(" \\cd [DIR] change the current working directory\n"));
|
||||
|
Reference in New Issue
Block a user