On Tue, Oct 30, 2012 at 12:53 AM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote: > On 10/29/2012 04:00 AM, Chris Angelico wrote: >> >> Not sure what you mean by that, but my postgresql.conf doesn't have >> anything about application_name. But if it did, it would be a default >> that an application can override. > > > Actually it does: > > log_line_prefix = # %a = application name > # %u = user name > # %d = database name > > http://www.postgresql.org/docs/9.2/interactive/runtime-config-logging.html#GUC-APPLICATION-NAME Yep, but it doesn't have anything about _setting_ the app name. The original question involved a postgresql.conf directive "application_name = '....'", which I can't find any docs for, nor can I find in my well-commented default config from the openscg install. > It is a chicken and egg situation. See section 31.1.2. Parameter Key Words > of below: > > http://www.postgresql.org/docs/9.2/interactive/libpq-connect.html > > "application_name > Specifies a value for the application_name configuration parameter." That's on the connection, which is where I'm recommending setting it. There's no magic that picks up your application's executable name, but you can of course pass argv[0] to libpq as the application_name. ChrisA -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general