Re: Client application name - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Client application name
Date
Msg-id 4AD49E05.9090002@dunslane.net
Whole thread Raw
In response to Re: Client application name  (Dave Page <dpage@pgadmin.org>)
Responses Re: Client application name
List pgsql-hackers

Dave Page wrote:
> On Tue, Oct 13, 2009 at 4:11 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>   
>> Doing it with a GUC will not be nearly so useful as having it in the wire
>> protocol, IMNSHO. Just one example: it wouldn't be present in connection
>> records, because it wouldn't be set yet.
>>     
>
> I quite like the flexibility of being able to set/show a GUC at any
> time, but you raise a good point. I'll need to venture into previously
> unknown territory (for me at least :-p) to figure out how best to do
> that, and if possible keep the GUC...
>
>   
From time to time people ask for "scalar variable" facility. ISTM what 
you're trying to do is just a special case of that. Maybe we could 
approach it by providing a builtin (and non-removable) 
custom_variable_classes entry ('pg_variables'?). Then you could have 
clients safely do:
   set pg_variables.client_name = 'blurfl';

And I'm sure other people would find interesting uses for such a gadget.

cheers

andrew


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Client application name
Next
From: Tom Lane
Date:
Subject: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)