Re: Client application name

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Client application name
Дата
Msg-id 4AD49E05.9090002@dunslane.net
обсуждение исходный текст
Ответ на Re: Client application name  (Dave Page <dpage@pgadmin.org>)
Ответы Re: Client application name  (Dave Page <dpage@pgadmin.org>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Client application name
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)