From: Stéphan BEUZE <stephan.beuze@douane.finances.gouv.fr>
To: Sehrope Sarkuni <sehrope@jackdb.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: [***] Re: Set application name from jdbc url
Date: Thu, 17 Oct 2013 16:11:17 +0200
Message-ID: <525FF005.9090206@douane.finances.gouv.fr> (raw)
In-Reply-To: <CAH7T-ar-mdYZ0rEh6o3WkqHk0MXRwfvCqM2vQ1AdvxoP69xCvA@mail.gmail.com>
References: <525FE7EC.9050003@douane.finances.gouv.fr>
<CAH7T-ar-mdYZ0rEh6o3WkqHk0MXRwfvCqM2vQ1AdvxoP69xCvA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
The solution from [2] works like a charm.
However, the solution from [1] doesn't work :\
I have set up a database connection from the Datasource explorer in Eclipse,
with the following JDBC url:
jdbc:postgresql://localhost:5435/REC?ApplicationName=ZOZOZOZ
From pgAdmin III, here are the results of the following query : select
pid, application_name from pg_stat_activity
9212;""
6396;""
4628;"psql"
6796;"pgAdmin III - Navigateur"
The results of the same query running from psql:
pid | application_name
------+-------------------------------------
9212 |
6396 |
4628 | psql
6796 | pgAdmin III - Navigateur
I have tried to set up a connection manually and I get the same similar
results: ZOZOZOZ seems to be an unknown application name.
Le 17/10/2013 15:44, Sehrope Sarkuni a écrit :
>> What is the correct parameter name ?
> Try "ApplicationName" [1]. Also, you can set it on the Connection
> object after creation via the JDBC standard setClientInfo(...)
> method[2].
>
> [1]: https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/core/v3/ConnectionFactoryImpl.java#L639
> [2]: http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#setClientInfo%28java.lang.String,%...
>
> -S
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: stephan.beuze@douane.finances.gouv.fr, sehrope@jackdb.com
Subject: Re: [***] Re: Set application name from jdbc url
In-Reply-To: <525FF005.9090206@douane.finances.gouv.fr>
References: <525FE7EC.9050003@douane.finances.gouv.fr> <CAH7T-ar-mdYZ0rEh6o3WkqHk0MXRwfvCqM2vQ1AdvxoP69xCvA@mail.gmail.com> <525FF005.9090206@douane.finances.gouv.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox