Re: Client application name - Mailing list pgsql-hackers

From Dave Page
Subject Re: Client application name
Date
Msg-id 937d27e10910210442x427af4d7se7513488db06a77c@mail.gmail.com
Whole thread Raw
In response to Re: Client application name  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Wed, Oct 21, 2009 at 12:01 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Wed, 2009-10-21 at 12:49 +0200, Magnus Hagander wrote:
>
>> PGOPTIONS is the way to do that, no? It can be a bit tricky when you
>> have to deal with quoting, but it is there and it works...
>
> Which will work for application name also.

In earlier discussion on this, we spoke about having some way of
overriding hard-coded values in the client, such that psql could
report it's application name, but that could be overridden by a value
in the environment as in the examples I gave earlier. This is the
exact opposite behaviour of the existing mechanism. The solution
implemented was to add 2 connection string options, one of which libpq
would only use if the other wasn't set, thus allowing you to hardcode
'fallback_application_name=psql', which could be overriden with
PGAPPLICATIONNAME.

Overloading this feature on PGOPTIONS not only makes that desired
behaviour impossible (at least without propagating the notion of
fallback_application_name to the backend), but also potentially makes
configuration/scripting more tricky for the user when that variable
now need to be reset as otherwise unrelated options are changed.

Besides, I really don't see the problem anyway. The patch is already
written - I'd rather work out the kink (for which we already have
three possible solutions) than rip out 50% of the functionality.

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
PGDay.EU 2009 Conference: http://2009.pgday.eu/start


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Client application name
Next
From: Peter Eisentraut
Date:
Subject: \du quite ugly in 8.4