Dave Page <dp...@pgadmin.org> wrote: > Robert Haas <robertmh...@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@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers