Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 38130632C95 for ; Sat, 1 May 2010 16:44:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 62095-01 for ; Sat, 1 May 2010 19:44:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 43B9A63250C for ; Sat, 1 May 2010 16:44:24 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 0704D2840F; Sat, 1 May 2010 15:44:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=uDDsceomNizmRU0mDsGSi5HBQ+c=; b=rWJq/V lp5USTEccQHb9tpByRnD/VNnG70ggf2sX+iqSnI/9J+IIttOf1C6qjLo17WT6pWj 04I2lIaRfM8Mobp9v3av4vvkcIFJCrZOSmKtyPohYYq2BdKvtMxXdcKal2mFIDuE fakDJGiQpwxbmiA3/5fLu4k5Jh4vdf36P71vM= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id F20E628404; Sat, 1 May 2010 15:44:21 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id BE575A388; Sat, 1 May 2010 15:44:21 -0400 (EDT) Date: Sat, 1 May 2010 15:44:21 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Kevin Grittner cc: maxime.levesque@gmail.com, pgsql-jdbc@postgresql.org Subject: Re: SQLException.getErrorCode ? In-Reply-To: <4BDC2BBD0200002500031157@gw.wicourts.gov> Message-ID: References: <4BDC2BBD0200002500031157@gw.wicourts.gov> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/17 X-Sequence-Number: 20501 On Sat, 1 May 2010, Kevin Grittner wrote: > Kris Jurka wrote: > >> As I said earlier you need to check SQLException.getSQLState, not >> getErrorCode. > > Why anyone would want to use error code instead of SQLSTATE is > beyond me, but since they're out there, perhaps we should implement > getErrorCode to interpret SQLSTATE as a base 36 number, and return > that number? It might take less time than fielding the next > complaint. ;-) > > The biggest down side is that we'd have to document it.... > Exactly, who's going to maintain this list of alternate error code versions? If the main project was to put this version of the error codes in the master table of error codes, then I guess it would be OK. I can't imagine proposing that though, unless there are other driver projects that are in the same position. Kris Jurka