Re: Application name patch - v2

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Harald Armin Massa" <chef(at)ghum(dot)de>, "Magnus Hagander" <magnus(at)hagander(dot)net>, "Dave Page" <dpage(at)pgadmin(dot)org>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Application name patch - v2
Date: 2009-10-21 13:48:40
Message-ID: 4ADECAE8020000250002BC34@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-10-21 14:02:15 Re: Re: BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable"
Previous Message Rod Taylor 2009-10-21 13:45:42 Re: Could regexp_matches be immutable?