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