Re: Application name patch - v2 - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Application name patch - v2
Date
Msg-id 9837222c0910200918l77fae9c4g8e40478cc2a62d4e@mail.gmail.com
Whole thread Raw
In response to Re: Application name patch - v2  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Application name patch - v2
Re: Application name patch - v2
List pgsql-hackers
2009/10/20 Tom Lane <tgl@sss.pgh.pa.us>:
> Magnus Hagander <magnus@hagander.net> writes:
>> Also, how many platforms can't we do this on? If we have BSD and
>> Windows covered already. on linux, I believe you can easily read it
>> out of /proc/self/cmdline, no?
>
> Writing a pile of platform-specific code for this is simply insane from
> a support point of view.  The feature is NOT worth it.  Especially not
> since the typical result will be something quite uninformative like
> "psql" or "java".  The cases that are actually useful are the ones where
> the application sets it.  I don't think we should have a default at all
> --- you don't set it, you don't get a name.

For psql, yes.
For java, it doesn't even go through libpq, so it wouldn't be set for
it. And I'd expect the JDBC driver to set it based on Something
Reasonable (TM) that it can get the information about. After all, this
thing was listed in the JDBC spec somebody said...

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: David Christensen
Date:
Subject: Re: UTF8 with BOM support in psql
Next
From: Andrew Dunstan
Date:
Subject: OpenACS vs Postgres