Re: Huh? ErrorCode/SQLstate are null?

From: Barry Lind <barry(at)xythos(dot)com>
To: beh(at)icemark(dot)net
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Huh? ErrorCode/SQLstate are null?
Date: 2002-10-02 16:27:31
Message-ID: 3D9B1E73.3010202@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Please see the many past posts in the archives on this topic. But the
short answer is: the postgres server doesn't yet support error codes and
therefore neither does the jdbc driver. It is on the todo list for both
however, but no one has yet stepped up to implement it.

--Barry

beh(at)icemark(dot)net wrote:
> Hi there,
>
> how can I actually find out more about an SQL error except by
> looking at the message in an exception?
>
> If I try to insert into a non-existing relation or an insert
> generates a duplicate key, the thrown SQLException yields SQLstate
> null and ErrorCode 0... Just the result from
> SQLException.getMessage() seems to make sense...
>
>
> I am using postresql-7.2.1-2 from Debian "testing" on linux-i386.
> The error occurs on both the current libpgjava package as well as
> the latest beta driver (pg73b1jdbc3.jar) from jdbc.postgresql.org.
>
>
> Is that behaviour 'normal' in the postgresql JDBC driver?
> Or is there some problem with the setup on my side?
>
>
> Benedikt
>
> BEAUTY, n. The power by which a woman charms a lover and terrifies a
> husband.
> (Ambrose Bierce, The Devil's Dictionary)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dror Matalon 2002-10-02 17:32:47 Re: Huh? ErrorCode/SQLstate are null?
Previous Message mike beachy 2002-10-02 16:02:36 build.xml patch