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

Re: BUG #2593: Improper implimentation of SQLException

From: Kris Jurka <books(at)ejurka(dot)com>
To: Igor Urisman <igor(dot)urisman(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2593: Improper implimentation of SQLException
Date: 2006-08-30 05:46:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs

On Sun, 27 Aug 2006, Igor Urisman wrote:

> The following bug has been logged online:
> Bug reference:      2593
> PostgreSQL version: 8.1.3
> Description:        Improper implimentation of SQLException
> Details:
> The vendor error code is returned in getSQLState(), instead of getError().
> At least this is the case for 23505 (ERROR: duplicate key violates unique
> constraint ...)

Postgresql does not have specific vendor error codes and always returns 0 
for SQLException.getErrorCode().  Postgresql uses standard SQL State 
values only.  These often have characters in them so they cannot also be 
returned as the vendor error code.

Perhaps the problem is that this page is referring to error codes when a 
more careful reading shows that it is really talking about sql state 

Kris Jurka

In response to

pgsql-bugs by date

Next:From: Filip HrbekDate: 2006-08-30 08:18:46
Subject: Re: Partially corrupted table
Previous:From: Tom LaneDate: 2006-08-30 02:10:10
Subject: Re: Partially corrupted table

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