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

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: BUG #5304: psql using conninfo fails in connecting to the server
Дата
Msg-id 4B68DE97.30906@joeconway.com
обсуждение исходный текст
Ответ на Re: BUG #5304: psql using conninfo fails in connecting to the server  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #5304: psql using conninfo fails in connecting to the server
Список pgsql-bugs
On 02/02/2010 06:10 PM, Tom Lane wrote:
> Since we haven't yet released PQconnectdbParams, it's not too late
> to twiddle its API.  What I'm thinking about is an additional
> boolean parameter "expand_dbname", which only if true would enable
> treating an equal-sign-containing dbname like a conninfo string.
> Passing true would be okay for command-line apps where the user is
> supposed to control all the conn parameters anyway, but apps that
> want more security would pass false.

OK

> We should also give more than zero thought to how values coming from the
> expanded dbname should interact with values from other arguments to
> PQconnectdbParams --- which should override which?  And should there be
> an order dependency?

My first thought was to duplicate the logic used by PQsetdbLogin(). It
uses the conninfo string, fills in the defaults using connectOptions1(),
applies the supplied other arguments overriding the defaults, and then
finally computes derived options with connectOptions2(). It is
essentially the same as PQconnectdb() except the supplied parameters are
used before setting the derived options.

Joe

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5304: psql using conninfo fails in connecting to the server
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5304: psql using conninfo fails in connecting to the server