471,090 Members | 1,318 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

Java / Perl Return codes

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 ma*******@postgresql.org

Nov 23 '05 #1
1 2779
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 ma*******@postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by John Smith | last post: by
11 posts views Thread by Xah Lee | last post: by
7 posts views Thread by Piotr Turkowski | last post: by
458 posts views Thread by wellstone9912 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.