Re: [***] Re: Set application name from jdbc url
От | Stéphan BEUZE |
---|---|
Тема | Re: [***] Re: Set application name from jdbc url |
Дата | |
Msg-id | 525FF005.9090206@douane.finances.gouv.fr обсуждение исходный текст |
Ответ на | Re: Set application name from jdbc url (Sehrope Sarkuni <sehrope@jackdb.com>) |
Ответы |
Re: [***] Re: Set application name from jdbc url
|
Список | pgsql-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,%20java.lang.String%29 > > -S
В списке pgsql-jdbc по дате отправления: