diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-04-02 10:10:22 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-04-02 10:10:22 -0400 |
commit | 4cd639baf4bd35dd7fc924009203349b81bdcd68 (patch) | |
tree | 257af95aee58af4bc460a73e4224b4609f9b8c5f /doc/src/sgml/ref | |
parent | 7dae3cf68cf59c37163df42fb0d2b66fed9996f4 (diff) | |
download | postgresql-4cd639baf4bd35dd7fc924009203349b81bdcd68.tar.gz postgresql-4cd639baf4bd35dd7fc924009203349b81bdcd68.zip |
Revert "psql: fix \connect with URIs and conninfo strings"
This reverts commit fcef1617295c074f2684c887627184d2fc26ac04, about
which both the buildfarm and my local machine are very unhappy.
Diffstat (limited to 'doc/src/sgml/ref')
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 62a3b21209d..1f29615f833 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -796,31 +796,23 @@ testdb=> </varlistentry> <varlistentry> - <term><literal>\c</literal> or <literal>\connect</literal> <literal>[ <replaceable class="parameter">dbname</replaceable> [ <replaceable class="parameter">username</replaceable> ] [ <replaceable class="parameter">host</replaceable> ] [ <replaceable class="parameter">port</replaceable> ] ] | <replaceable class="parameter">conninfo</replaceable> </literal></term> + <term><literal>\c</literal> or <literal>\connect</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 new connection to a <productname>PostgreSQL</> - server. The connection parameters to use can be specified either - using a positional syntax, or using <literal>conninfo</> connection - strings as detailed in <xref linkend="libpq-connstring">. + server. If the new connection is successfully made, the + previous connection is closed. If any of <replaceable + class="parameter">dbname</replaceable>, <replaceable + class="parameter">username</replaceable>, <replaceable + class="parameter">host</replaceable> or <replaceable + class="parameter">port</replaceable> are omitted or specified + as <literal>-</literal>, the value of that parameter from the + previous connection is used. If there is no previous + connection, the <application>libpq</application> default for + the parameter's value is used. </para> <para> - When using positional parameters, if any of - <replaceable class="parameter">dbname</replaceable>, - <replaceable class="parameter">username</replaceable>, - <replaceable class="parameter">host</replaceable> or - <replaceable class="parameter">port</replaceable> are omitted or - specified as <literal>-</literal>, the value of that parameter from - the previous connection is used; if there is no previous connection, - the <application>libpq</application> default for the parameter's value - is used. When using <literal>conninfo</> strings, no values from the - previous connection are used for the new connection. - </para> - - <para> - If the new connection is successfully made, the previous - connection is closed. If the connection attempt failed (wrong user name, access denied, etc.), the previous connection will only be kept if <application>psql</application> is in interactive mode. When @@ -830,16 +822,6 @@ testdb=> mechanism that scripts are not accidentally acting on the wrong database on the other hand. </para> - - <para> - Examples: - </para> -<programlisting> -=> \c mydb myuser host.dom 6432 -=> \c service=foo -=> \c "host=localhost port=5432 dbname=mydb connect_timeout=10 sslmode=disable" -=> \c postgresql://tom@localhost/mydb?application_name=myapp -</programlisting> </listitem> </varlistentry> |