Re: BUG #5304: psql using conninfo fails in connecting to the server - Mailing list pgsql-bugs

From Fujii Masao
Subject Re: BUG #5304: psql using conninfo fails in connecting to the server
Date
Msg-id 3f0b79eb1002021746g1a568103m64ef28c3e50c1c1d@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5304: psql using conninfo fails in connecting to the server  (Joe Conway <mail@joeconway.com>)
Responses Re: BUG #5304: psql using conninfo fails in connecting to the server  (Joe Conway <mail@joeconway.com>)
Re: BUG #5304: psql using conninfo fails in connecting to the server  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Feb 3, 2010 at 10:05 AM, Joe Conway <mail@joeconway.com> wrote:
> Here's a patch.

Thanks!

> If "=" is found in the dbname psql argument, the argument is assumed to
> be a conninfo string. In that case, append application_name to the
> conninfo and use PQsetdbLogin() as before. Otherwise use the new
> PQconnectdbParams().
>
> Also only uses static assignments for array constructors.
>
> Objections?

I think that PQconnectdbParams() rather than psql should handle the
dbname containing "=". Otherwise whenever we use PQconnectdbParams(),
we would have to check for the content of the dbname before calling
it in the future application. Which looks very messy for me.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

pgsql-bugs by date:

Previous
From: Joe Conway
Date:
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Next
From: Joe Conway
Date:
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server