mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +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:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.157 2005/12/20 00:51:45 tgl Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.158 2006/02/12 02:54:30 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -693,13 +693,15 @@ testdb=>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>\connect</literal> (or <literal>\c</literal>) <literal>[ <replaceable class="parameter">dbname</replaceable> [ <replaceable class="parameter">username</replaceable> ] ]</literal></term>
|
||||
<term><literal>\connect</literal> (or <literal>\c</literal>) <literal>[ <replaceable class="parameter">dbname</replaceable> [ <replaceable class="parameter">username</replaceable> ] [ <replaceable class="parameter">host</replaceable> ] [ <replaceable class="parameter">port</replaceable> ] ]</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Establishes a connection to a new database and/or under a user
|
||||
name. The previous connection is closed. If <replaceable
|
||||
class="parameter">dbname</replaceable> is <literal>-</literal>
|
||||
the current database name is assumed.
|
||||
the current database name is assumed. Similar consideration
|
||||
applies to <replaceable class="parameter">host</replaceable> and
|
||||
<replaceable class="parameter">port</replaceable>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user