From 4cd639baf4bd35dd7fc924009203349b81bdcd68 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 2 Apr 2015 10:10:22 -0400 Subject: 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. --- doc/src/sgml/ref/psql-ref.sgml | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) (limited to 'doc/src') 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=> - \c or \connect [ dbname [ username ] [ host ] [ port ] ] | conninfo + \c or \connect [ dbname [ username ] [ host ] [ port ] ] Establishes a new connection to a PostgreSQL - server. The connection parameters to use can be specified either - using a positional syntax, or using conninfo connection - strings as detailed in . + server. If the new connection is successfully made, the + previous connection is closed. If any of dbname, username, host or port are omitted or specified + as -, the value of that parameter from the + previous connection is used. If there is no previous + connection, the libpq default for + the parameter's value is used. - When using positional parameters, if any of - dbname, - username, - host or - port are omitted or - specified as -, the value of that parameter from - the previous connection is used; if there is no previous connection, - the libpq default for the parameter's value - is used. When using conninfo strings, no values from the - previous connection are used for the new connection. - - - - 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 psql 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. - - - Examples: - - -=> \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 - -- cgit v1.2.3