Set application name from jdbc url

From: Stéphan BEUZE <stephan(dot)beuze(at)douane(dot)finances(dot)gouv(dot)fr>
To: pgsql-jdbc(at)postgreSQL(dot)org
Subject: Set application name from jdbc url
Date: 2013-10-17 13:36:44
Message-ID: 525FE7EC.9050003@douane.finances.gouv.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I want to set the application name of the connections of my application.
Then I can list the rows in `pg_stat_activity` with a non empty
`application_name` column.

I have setup the following JDBC url for connecting to my Postgresql
database:

jdbc:postgresql://localhost:5435/MyDB?application-name=MyApp

I have tried also this url with no more success.

jdbc:postgresql://localhost:5435/MyDB?application_name=MyApp

I also tried these two variant of application name parameter :
*applicationName* and *ApplicationName* with no luck.

What is the correct parameter name ?

Here is my JDBC driver version: **9.1-901.jdbc4**
I try to connect a Postgresql server : 9.2.4 - 64bit - running on Windows 7

Stephan

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sehrope Sarkuni 2013-10-17 13:44:50 Re: Set application name from jdbc url
Previous Message Dave Cramer 2013-10-17 12:40:23 Re: BUG org.postgresql.Driver.connect() distorts InterruptedException