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

Re: Error codes in SQLException

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Christian Rengstl *EXTERN*" <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Error codes in SQLException
Date: 2007-10-30 13:38:06
Message-ID: (view raw or whole thread)
Lists: pgsql-jdbc
Christian Rengstl wrote:
> I was just wondering if there is a overview somewhere with the integer
> values returned by SQLException when calling getErrorCode().

getErrorCode() will return a vendor specific code; this is the
third argument in the three-argument constructor of

As far as I can see this constructor is never used in PostgreSQL,
so I would say that getErrorCode() will always return 0.

This makes sense since PostgreSQL uses no vendor specific
error codes, but the (supposedly fairly standardized)

You can get those with getSQLState().

Laurenz Albe

In response to

pgsql-jdbc by date

Next:From: Marek LewczukDate: 2007-10-30 13:47:45
Subject: Re: AbstractJdbc2Array - another patch
Previous:From: Achilleas MantziosDate: 2007-10-30 12:44:55
Subject: Re: Error codes in SQLException

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