Skip site navigation (1) Skip section navigation (2)

Re: SQLException and error code

From: Peter(dot)Zoche(at)materna(dot)de
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: SQLException and error code
Date: 2005-07-26 14:17:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Because in the postgresql documentation you can find the following page:

There you can see all ERROR CODES!

So why is there a method getErrorCode(), if the only thing it does
is to return zero?

-----Urspr√ľngliche Nachricht-----
Von: Oliver Jowett [mailto:oliver(at)opencloud(dot)com]
Gesendet: Dienstag, 26. Juli 2005 16:04
An: Peter(dot)Zoche(at)materna(dot)de
Cc: pgsql-jdbc(at)postgresql(dot)org
Betreff: Re: [JDBC] SQLException and error code

Peter(dot)Zoche(at)materna(dot)de wrote:

> I am using postgresql-8.0-310.jdbc3.jar in my application.
> In order to get the error code from an SQLException I have
> to use sqlexception.getSQLState(). Shouldn't it be
> getErrorCode()?

We get a SQLSTATE from the server already, so it makes sense to make
that available via getSQLState().

What exactly do you suggest we return from getErrorCode()?



pgsql-jdbc by date

Next:From: Oliver JowettDate: 2005-07-26 14:20:42
Subject: Re: Timestamp weirdness
Previous:From: Kevin GrittnerDate: 2005-07-26 14:10:43
Subject: Re: Timestamp weirdness

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group