]> granicus.if.org Git - postgresql/commit
Rewrite much of psql's \connect code, for the sake of code clarity and
authorNeil Conway <neilc@samurai.com>
Sun, 2 Apr 2006 20:08:22 +0000 (20:08 +0000)
committerNeil Conway <neilc@samurai.com>
Sun, 2 Apr 2006 20:08:22 +0000 (20:08 +0000)
commit7815ca7bef0e5d0218e003d6bd0de7e1ebbb24c1
tree72cc45341fb701ba1a4be9a5e0c5173726e0e742
parent23a1f015e533210b0c5b63bf24955c2e57d86a26
Rewrite much of psql's \connect code, for the sake of code clarity and
to fix regressions introduced in the recent patch adding additional
\connect options. This is based on work by Volkan YAZICI, although
this version of the patch doesn't bear much resemblance to Volkan's
version.

\connect takes 4 optional arguments: database name, user name, host
name, and port number. If any of those parameters are omitted or
specified as "-", the value of that parameter from the previous
connection is used instead; if there is no previous connection,
the libpq default is used. Note that this behavior makes it
impossible to reuse the libpq defaults without quitting psql and
restarting it; I don't really see the use case for needing to do
that.
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/command.c