Re: Client application name

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Client application name
Date: 2009-10-13 15:34:29
Message-ID: 4AD49E05.9090002@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dave Page wrote:
> On Tue, Oct 13, 2009 at 4:11 PM, Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-10-13 15:41:40 Re: Buffer usage in EXPLAIN and pg_stat_statements (review)
Previous Message Alvaro Herrera 2009-10-13 15:27:25 Re: Client application name