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

From Kevin Grittner
Subject Re: Application name patch - v2
Date
Msg-id 4ADECAE8020000250002BC34@gw.wicourts.gov
Whole thread Raw
In response to Re: Application name patch - v2  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Application name patch - v2
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> [ scratches head... ]  I thought the JDBC spec already said exactly
> how one would set this.  Why would we go to significant effort to
> make it behave contrary to spec?
We certainly should allow it to be set as specified in the spec.  The
only question is whether it makes sense to provide a non-null default
if it is not set in that way.  I thought Magnus was arguing for that. 
I have no objection, and see potential use-cases where that would be
convenient.
To illustrate what I'm talking about, adding something like this to
the command line which starts Java would provide the non-null default: -DPGAPPNAME="Receipting - Traffic"
(or whatever name we choose for this in place of PGAPPNAME.)
This seems similar to what is proposed for libpq.
The effort to support that would not be significant -- something
along the order of   if (appName == NULL)       appName = System.getProperty("PGAPPNAME");
Do you object?
-Kevin


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: \du quite ugly in 8.4
Next
From: Rod Taylor
Date:
Subject: Re: Could regexp_matches be immutable?