From: Robert Haas on
On Wed, Oct 21, 2009 at 11:25 AM, Tom Lane <tgl(a)sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew(a)dunslane.net> writes:
>> Tom Lane wrote:
>>> FWIW, I would prefer PGAPPNAME to PGAPPLICATIONNAME which is what
>
>> We don't usually use abbreviations, so how about PGCLIENTNAME  or some such?
>
> Not sure I believe that argument.  Among the set of existing libpq
> environment variables I see
>
> PGHOSTADDR
> PGSSLCERT
> PGSSLCRL
> PGKRBSRVNAME
> PGTZ
> PGSYSCONFDIR
>
> so it can hardly be said that there's a policy of avoiding
> abbreviations.  PGCLIENTNAME would be better than PGAPPLICATIONNAME
> I guess, but I still prefer the other.

I also like PGAPPNAME better, for the same reasons as Tom.

....Robert

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Andrew Dunstan on


Tom Lane wrote:
> Andrew Dunstan <andrew(a)dunslane.net> writes:
>
>> Tom Lane wrote:
>>
>>> FWIW, I would prefer PGAPPNAME to PGAPPLICATIONNAME which is what
>>>
>
>
>> We don't usually use abbreviations, so how about PGCLIENTNAME or some such?
>>
>
> Not sure I believe that argument. Among the set of existing libpq
> environment variables I see
>
> PGHOSTADDR
> PGSSLCERT
> PGSSLCRL
> PGKRBSRVNAME
> PGTZ
> PGSYSCONFDIR
>
> so it can hardly be said that there's a policy of avoiding
> abbreviations. PGCLIENTNAME would be better than PGAPPLICATIONNAME
> I guess, but I still prefer the other.
>
>
>

OK. I don't have strong feelings on the subject.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Dave Page on
On Wed, Oct 21, 2009 at 4:29 PM, Robert Haas <robertmhaas(a)gmail.com> wrote:

> I also like PGAPPNAME better, for the same reasons as Tom.

:-). Have to admit, I've mistyped it a few times too.


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
PGDay.EU 2009 Conference: http://2009.pgday.eu/start

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: "Kevin Grittner" on
Dave Page <dpage(a)pgadmin.org> wrote:
> Robert Haas <robertmhaas(a)gmail.com> wrote:
>
>> I also like PGAPPNAME better, for the same reasons as Tom.
>
> :-). Have to admit, I've mistyped it a few times too.

Well, it would seem we have consensus on that. :-)

I don't feel that the Java default issue reached the same level of
consensus, though. I think we can rule out anything beyond an
environment variable or system property as a non-null default. The
options seem to be:

(1) No non-null default. If they don't set it through the standard
techniques, the default is null.

(2) Use an environment variable.

(3) Use a system property.

(4) Some combination of (2) and (3), with one having precedence over
the other.

Here's what the Java documentation has to say about environment
variables versus system properties:

| System properties and environment variables are both conceptually
| mappings between names and values. Both mechanisms can be used to
| pass user-defined information to a Java process. Environment
| variables have a more global effect, because they are visible to all
| descendants of the process which defines them, not just the
| immediate Java subprocess. They can have subtly different semantics,
| such as case insensitivity, on different operating systems. For
| these reasons, environment variables are more likely to have
| unintended side effects. It is best to use system properties where
| possible. Environment variables should be used when a global effect
| is desired, or when an external system interface requires an
| environment variable (such as PATH).

It would be zero lines of programming to support *setting* either or
both, just documenting it and very simple code to use either. For
example, assuming the code to support the standard setting is written,
we could allow both defaults for cases where it isn't explicitly set,
with precedence given to the system property; and the entire
programming effort would look something like this:

if (appName == null)
appName = System.getProperty("PGAPPNAME",
System.getenv("PGAPPNAME"));

So the coding involved isn't overwhelming. :-)

The primary use case would be to allow someone with an existing
application to set this without changing or recompiling any Java code
-- they could just set the value in the launch script.

Does anyone have an opinion on this?

-Kevin

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

First  |  Prev  | 
Pages: 5 6 7 8 9 10 11 12 13 14 15
Prev: Hot standby status
Next: per table random-page-cost?