Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id BF4FD63266C for ; Sat, 1 May 2010 13:11:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 93793-06 for ; Sat, 1 May 2010 16:11:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 044F1632E41 for ; Sat, 1 May 2010 13:11:22 -0300 (ADT) Received: by pwj9 with SMTP id 9so657071pwj.19 for ; Sat, 01 May 2010 09:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=0+k73I/CUsK+FzGQHFJyP6hkkwO5Ex/qE20FabNUdD8=; b=gz9lUGK8NBU5cF08/+2/RokJzbuEidQmRiztDHaWLyLj8TwMu3TqMok4lW2Zh6/290 WTYUz3d5hD7l9ExxGQxPjgfINMEjGTqagCU+z0c+y0Pci4EVdc44lgB+W+Y4dCUFlvgo vkB7S+x7IkkuoXxPBAVYjZGfQryJMx4viFaRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=gGCE87YpjZtdpRslmqg97WG4vNt+lrEmDCakq5muyxWUCirDHtMKu00VKx1dj43Ud+ AiY3qsaf79Zc3PdAA/v6Li+rnJi7Mu6+E20j8IpQVUJDR7iyjfF20ha3XvuIvcZIDbkQ x2HVCeyzRCGlo7owJH56fO76Rx0+R4/TN9lC0= MIME-Version: 1.0 Received: by 10.142.2.11 with SMTP id 11mr2446056wfb.51.1272730281861; Sat, 01 May 2010 09:11:21 -0700 (PDT) Received: by 10.142.255.11 with HTTP; Sat, 1 May 2010 09:11:21 -0700 (PDT) Date: Sat, 1 May 2010 12:11:21 -0400 Message-ID: Subject: SQLException.getErrorCode ? From: =?ISO-8859-1?Q?Maxime_L=E9vesque?= To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=00504502bd7058628d04858a9ccb X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201005/10 X-Sequence-Number: 20494 --00504502bd7058628d04858a9ccb Content-Type: text/plain; charset=ISO-8859-1 The method SQLException.getErrorCode of the jdbc driver systematically returns 0, From what I have found on the web, the server doesn't have good support for error codes, and it is the reason the jdbc driver doesn't return error codes. The doc here talks about error codes : http://www.postgresql.org/docs/8.4/interactive/errcodes-appendix.html Where are error codes support on the roadmap ? I would like to detect things like 'table does not exist' , constraint does not exist, etc.. from the SQLException Is there a workaround ? Thanks And thanks for the quick replies to my previous questions ! ;-) --00504502bd7058628d04858a9ccb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
=A0The method=A0 SQLException.getErrorCode of the jdbc driver systemati= cally returns 0,

=A0From what I have found on the web, the server do= esn't have good support for error codes,
and it is the reason the jd= bc driver doesn't return error codes.

The doc here talks about error codes :

=A0http://www.post= gresql.org/docs/8.4/interactive/errcodes-appendix.html

Where are= error codes support on the roadmap ?

I would like to detect things like 'table does not exist' , con= straint does not exist, etc.. from the SQLException

=A0Is there a w= orkaround ?

=A0Thanks

=A0And thanks for the quick replies to = my previous questions ! ;-)
--00504502bd7058628d04858a9ccb--