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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Error codes in SQLException



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
java.sql.SQLException.

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)
SQLSTATEs (see
http://www.postgresql.org/docs/current/static/errcodes-appendix.html).

You can get those with getSQLState().

Yours,
Laurenz Albe


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group