Skip site navigation (1) Skip section navigation (2)

Re: BUG #5304: psql using conninfo fails in connecting to the server

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Date: 2010-02-03 01:46:14
Message-ID: 3f0b79eb1002021746g1a568103m64ef28c3e50c1c1d@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On Wed, Feb 3, 2010 at 10:05 AM, Joe Conway <mail(at)joeconway(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Joe ConwayDate: 2010-02-03 01:50:46
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Previous:From: Tom LaneDate: 2010-02-03 01:14:17
Subject: pgsql: Assorted cleanups in preparation for using a map file to support

pgsql-bugs by date

Next:From: Joe ConwayDate: 2010-02-03 01:50:46
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Previous:From: Joe ConwayDate: 2010-02-03 01:05:31
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group