Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VWoJn-00034p-6Y for pgsql-jdbc@arkaria.postgresql.org; Thu, 17 Oct 2013 14:12:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VWoJm-0002WJ-FF for pgsql-jdbc@arkaria.postgresql.org; Thu, 17 Oct 2013 14:12:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VWoJl-0002WC-J0 for pgsql-jdbc@postgresql.org; Thu, 17 Oct 2013 14:12:49 +0000 Received: from malamut.minefi.gouv.fr ([212.99.10.165]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VWoJi-0007Jm-8B for pgsql-jdbc@postgresql.org; Thu, 17 Oct 2013 14:12:49 +0000 Received: From cdn20034.douane ([10.116.200.234]) by cdnlan003.douane (WebShield SMTP v4.5 MR2); id 1382019089789; Thu, 17 Oct 2013 16:11:29 +0200 Received: from cdnlan035.douane (cdn20036.douane [10.116.202.67]) by CDN20034.douane (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id for pgsql-jdbc@postgresql.org; Thu, 17 Oct 2013 16:11:21 +0200 Date: Thu, 17 Oct 2013 16:11:17 +0200 From: =?ISO-8859-1?Q?St=E9phan_BEUZE?= Subject: Re: [***] Re: Set application name from jdbc url In-reply-to: To: Sehrope Sarkuni Cc: List Message-id: <525FF005.9090206@douane.finances.gouv.fr> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 References: <525FE7EC.9050003@douane.finances.gouv.fr> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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=3DZOZOZOZ From pgAdmin III, here are the results of the following query : select=20 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=20 results: ZOZOZOZ seems to be an unknown application name. Le 17/10/2013 15:44, Sehrope Sarkuni a =E9crit : >> 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#se= tClientInfo%28java.lang.String,%20java.lang.String%29 > > -S --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc