Re: proposal: option --application_name for psql

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: proposal: option --application_name for psql
Дата
Msg-id CABUevEwiCjOKkAmwfGAY5FSx59NV-SVNXQSU0Hws+BxWTS+T6w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: option --application_name for psql  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: option --application_name for psql
Список pgsql-hackers
On Tue, May 14, 2013 at 9:25 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2013/5/14 Erik Rijkers <er@xs4all.nl>:
>> On Tue, May 14, 2013 21:04, Pavel Stehule wrote:
>>> Hello
>>>
>>> we like to use psql in combination with bash - just like postgresql driver.
>>>
>>> Actually there is no simple possibility (from command line) to set
>>> application_name. We would to use different name than psql - for
>>> example "splunk", ...
>>>
>>> I tested PGAPPNAME, but it doesn't work.
>>>
>>
>> It does work:
>>
>> $ PGAPPNAME=splunk psql -c "select application_name from pg_stat_activity;"
>>  application_name
>> ------------------
>>  splunk
>> (1 row)
>>
>> But perhaps I misunderstood your intention?
>>
>
> I was wrong - PGAPPNAME works, thank you
>
> but command line --application_name option should be a useful option I
> am thinking still
>

That goes for a lot of the parameters that go in a connection string,
I'm not sure application_name is common enough to have it's own
argument if other parameters don't. And you can still set it as long
as you use psql in "connection string mode", as you can with all the
libpq parameters.

--Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: option --application_name for psql
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: option --application_name for psql