Re: Java / Perl Return codes

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Alex P <alex(at)meerkatsoft(dot)com>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Java / Perl Return codes
Date: 2004-11-05 14:50:02
Message-ID: 1099666202.6361.84.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Check out:
src/include/utils/errcodes.h
in the postgres source tree.
In Java you will get these error codes using the getSQLState method on
the SQLException. You should also check the JDBC source to any further
JDBC specific codes, as it is possible to have JDBC side errors (i.e.
not coming from the backend).
With perl I have no experience.

HTH,
Csaba.

On Fri, 2004-11-05 at 15:15, Alex P wrote:
> Hi,
> i would like to check for a given query (insert, update, delete) if
> there is a key or constraint violation which prevents the query from
> being executed.
>
> Is such a feature implemented in the perl or java drivers?
>
> If so, could anyone point to a list of available return codes?
>
> Thanks
> Alex
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sally Sally 2004-11-05 15:15:41 VACUUM failing ??!!
Previous Message Alex P 2004-11-05 14:15:05 Java / Perl Return codes