jdbc excpetions in pg

From: "Thomas Finneid" <tfinneid(at)fcon(dot)no>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: jdbc excpetions in pg
Date: 2009-06-03 15:28:33
Message-ID: 2855.89.8.146.200.1244042913.squirrel@fcon.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi

I was looking at the documentation for the pg jdbc driver and it seems to
me that the driver throws SQLExceptions only, or mostly. I.e. the driver
does not create any subclasses of the SQLException class. Is this correct?

If so, what is the suggested method for classifying the errors to more
detail than SQLException? I was hoping to make my code more robust by
dealing with the errors more appropriately.

regards

thomas

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message user2037 2009-06-03 19:12:40 Strings with null characters produce exceptions when selected or inserted. Attempts to select messages with null bytes produces "ERROR: insufficient data left in message". And inserting produces "ERROR: invalid byte sequence for encoding \"UTF8\": 0x00". Since a null character is a valid UTF code point why is it rejected by the JDBC driver? The attached test can work with Mysql and their JDBC driver.
Previous Message Tom Lane 2009-06-03 15:25:40 Re: [Patch] Binary Transfer v12