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

Re: SQLException and error code

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Peter(dot)Zoche(at)materna(dot)de
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: SQLException and error code
Date: 2005-07-26 23:33:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Peter(dot)Zoche(at)materna(dot)de wrote:
> Because in the postgresql documentation you can find the following page:
> There you can see all ERROR CODES!

Those codes are actually SQLSTATEs.

> So why is there a method getErrorCode(),

It's defined by the JDBC spec, we don't have any choice about whether it
is there or not.

> if the only thing it does
> is to return zero?

Back to my original question: what are you expecting it to return? It
can't return a SQLSTATE because it returns an int and SQLSTATE is
alphanumeric. We don't have any other useful error code. So we just
return 0 because we have to return *something*.


In response to

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2005-07-26 23:35:34
Subject: Re: Configuring Connections
Previous:From: Oliver JowettDate: 2005-07-26 23:29:38
Subject: Re: Timestamp Summary

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