Re: proposal: option --application_name for psql - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: proposal: option --application_name for psql
Date
Msg-id b9729765be907be308212d3f51b3680c.squirrel@webmail.xs4all.nl
Whole thread Raw
In response to proposal: option --application_name for psql  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: option --application_name for psql  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
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?


Thanks,

Erik Rijkers







pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Move unused buffers to freelist
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: option --application_name for psql