Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B392F633D52 for ; Mon, 3 May 2010 01:41:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 11342-01-9 for ; Mon, 3 May 2010 04:40:59 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 00E40632B5E for ; Mon, 3 May 2010 01:40:45 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id o434eiLC009196 for ; Mon, 3 May 2010 01:40:44 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id o434Qh1Q089084 for pgsql-jdbc@postgresql.org; Mon, 3 May 2010 01:26:43 -0300 (ADT) (envelope-from news) From: Lew X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: SQLException.getErrorCode ? Date: Mon, 03 May 2010 00:26:45 -0400 Organization: albasani.net Lines: 18 Message-ID: References: <4BDC2BBD0200002500031157@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@albasani.net X-User-ID: lliYZDNiyHyng/VcCHRAI0Tp9SBL13bKIoE8RpgZtvk= In-Reply-To: Cancel-Lock: sha1:VhBESWJx+wC4JWImi17VgVXZcP8= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 X-NNTP-Posting-Host: z85oSxKuShJnelCqQ0y9OmR3RKoDtLO7PP72/+cHoKY= To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/22 X-Sequence-Number: 20506 On 05/01/2010 08:17 PM, Maxime Lévesque wrote: > > I was just thinking that putting the getSQLState string in the > exception's toString > message would go a long way in hinting the users that postgres [sic] does > provide error codes. Umm, the SQLException documentation is quite clear the 'getErrorCode()' returns only vendor-specific codes and that 'getSQLState()' returns the SQL state value. Since the latter is standard and the former is not, that already "goes a long way [to] hinting ... that" PG provides SQL Standard codes. Nothing further is needed. It seems fair that there is a presumption of knowledge of the standard. -- Lew