Re: Application name patch - v2

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Application name patch - v2
Дата
Msg-id 4ADDCEB9.1080106@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Application name patch - v2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Application name patch - v2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> 2009/10/20 Dave Page <dpage@pgadmin.org>:
>>> Yeah, and there's a similar API on *BSD I believe, but nothing standard.
> 
>> Right, but it might be worth investigating using the API that's
>> available on the platform, if one is. It's a fairly simple operation
>> after all, so it won't take huge amounts of platform-specific code.
> 
> It would be a seriously bad idea for this to behave one way on some
> platforms and differently on others.

Why would that be so bad? On platforms that support getting argv[0],
you'd get "mycoolapp" in the application name by default. On others,
you'd get something like "unknown libpq app". And if you care enough,
you can override it in the application or with the environment variable.
Seems quite sane and harmless to me.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Could postgres be much cleaner if a future release skipped backward compatibility?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Could postgres be much cleaner if a future release skipped backward compatibility?