Re: Client application name

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Client application name
Дата
Msg-id 937d27e10910150656gc8574edj6b24247861089e45@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Client application name  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Client application name
Re: Client application name
Список pgsql-hackers
On Wed, Oct 14, 2009 at 3:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Sure.  I'm envisioning that what the env variable or connection option
> actually does is cause libpq to include a SET command for a GUC
> variable in the initial connection request packet.  Compare, say,
> PGCLIENTENCODING -> client_encoding.

So you can now do any of the following to set the application name:

- Set $PGAPPLICATIONNAME on the client, prior to connection.
- Include 'application_name=MyCoolApp' in the PQconnectdb connection string.
- Use SET application_name

Currently though, pg_dump and psql (and presumably their close
friends) use PQsetdbLogin to establish their connection. Would it be
preferred if I:

a) Added PQsetdbLogin2() with an additional option for the application
name (my guess is 'no').
b) Updated the apps to use PQconnectdb
c) Something else?

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Rejecting weak passwords
Следующее
От: Dave Page
Дата:
Сообщение: Re: Rejecting weak passwords