pgsql: Rewrite much of psql's \connect code, for the sake of code

From: neilc(at)postgresql(dot)org (Neil Conway)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rewrite much of psql's \connect code, for the sake of code
Date: 2006-04-02 20:08:23
Message-ID: 20060402200823.7BBBE11F6D45@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/doc/src/sgml/ref:
psql-ref.sgml (r1.160 -> r1.161)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/psql-ref.sgml.diff?r1=1.160&r2=1.161)
pgsql/src/bin/psql:
command.c (r1.165 -> r1.166)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/command.c.diff?r1=1.165&r2=1.166)

Browse pgsql-committers by date

  From Date Subject
Next Message James William Pye 2006-04-02 20:18:30 python - be: Throw IndexError when subscript is out of bounds.
Previous Message Tom Lane 2006-04-02 19:40:04 pgsql: Adjust interval-addition test so that it won't fail on DST