Re: Client application name

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Client application name
Дата
Msg-id 937d27e10910150846k6093afe3k3031d4b818041f5c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Client application name  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Client application name  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Oct 15, 2009 at 4:37 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Another possibility that should be mentioned for the record is that
> we could special-case the appname parameter inside libpq, so that the
> environment variable takes precedence over the conn setting instead
> of the other way round.  That seems pretty ugly too, but maybe it's
> the least bad answer, if we decide that most apps need that precedence.

Looking further, I think this might be quite clean:

- Add a precedence flag to PQconninfoOption

- In conninfo_parse, in the section that grabs the envvars for empty
params, modify the logic to override any existing values if a value is
set in the environment and the precedence flag is set for that option.

That may be useful in the future for other options, and will certainly
be less ugly than special casing one setting.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Client application name
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Client application name