Application name patch - v3

Dave Page <dpage@pgadmin.org>

From: Dave Page <dpage@pgadmin.org>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2009-10-22T13:07:13Z
Lists: pgsql-hackers

Attachments

Updated patch attached. Per discussion, this:

- Changes the envvar name to PGAPPNAME
- Removes support for setting application_name in the startup packet,
and instead sends an explicit SET command as part of the connection
setup in PQconnectPoll. In order to avoid adding to the
application-visible connection states, this is overloaded on the
CONNECTION_SETENV state which is only used in the v2 protocol at
present and seems like an ideal fit for such a similar use.

Other features are as per the last version.

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