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 4B68CBDB.4070006@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
Re: BUG #5304: psql using conninfo fails in connecting to the server
Список pgsql-bugs
On 02/01/2010 08:06 AM, Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Fujii Masao wrote:
>>> In HEAD, psql using conninfo fails in connecting to the server as follows.
>>>
>>> $ bin/psql "host=localhost"
>>> psql: FATAL:  database "host=localhost" does not exist
>>>
>>> This is because the recently-introduced PQconnectStartParams()
>>> doesn't handle correctly the dbname parameter containing '='.
>
>> Hmm, I don't think that was ever really supposed to work, it was
>> accidental that it did.
>
> No, it was intentional.

Here's a patch.

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?

Thanks,

Joe

Вложения

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

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