Re: JDBC error codes to detect duplicates? - Mailing list pgsql-interfaces

From Max Khon
Subject Re: JDBC error codes to detect duplicates?
Date
Msg-id Pine.BSF.4.21.0103020041110.98084-100000@iclub.nsu.ru
Whole thread Raw
In response to JDBC error codes to detect duplicates?  ("David Wall" <d.wall@computer.org>)
Responses Re: JDBC error codes to detect duplicates?  (Peter Mount <peter@retep.org.uk>)
List pgsql-interfaces
hi, there!

On Thu, 1 Mar 2001, David Wall wrote:

> It seems that when an INSERT causes a duplicate key exception for
> unique/primary keys, the JDBC library is throwing the SQL exception but
> there is no code that lets my program detect a duplicate key error, or which
> key caused the duplicate error.
> 
> Is there a plan for the JDBC to return the codes for postgres back to the
> program?  I running 7.1beta4 now.

AFAIK clean implementation of such feature is not possible because backend
protocol does not have error codes (only error messages)

/fjoe



pgsql-interfaces by date:

Previous
From: "David Wall"
Date:
Subject: JDBC error codes to detect duplicates?
Next
From: "David Wall"
Date:
Subject: Re: JDBC error codes to detect duplicates?