Re: Clean up wasNullFlag usage - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Clean up wasNullFlag usage
Date
Msg-id Pine.BSO.4.64.0707270455120.2617@leary.csoft.net
Whole thread Raw
In response to Clean up wasNullFlag usage  (Mikko Tiihonen <mikko.tiihonen@iki.fi>)
List pgsql-jdbc

On Sat, 21 Jul 2007, Mikko Tiihonen wrote:

> The wasNullFlag must be evaluated for each getXXX method invocation.
> Currently it is done all over the ResultSet classes. The patch moves
> the evaluation inside checkResultSet method that is already invoked at
> the beginning of each getXXX method. Also updates the javadoc to be
> explicit about the functionality.
>

One of the reasons for doing the ad-hoc null flag setting was to avoid
multiple checkResultSet calls like you've now introduced for things like
getByte.  Rethinking that decision now, the performance impact of
checkResultSet is virtually non-existent, so this cleanup makes sense.

Applied with some additional minor modifications (missed
Jdbc[24]ResultSet, mention the fact that getFastXXX can no longer handle
null values).

I don't like slipping in unrelated functionality changes like this one,
which I took out:

+        if (fields[columnIndex - 1].getOID() == Oid.BOOL) {
+            return toBoolean(getFixedString(columnIndex)) ? 1 : 0;
+        }

I'm not opposed to the idea, but please raise things like this as separate
issues and not silently lump it in with a change that supposedly didn't
affect functionality.  Please resubmit.

Kris Jurka


pgsql-jdbc by date:

Previous
From: "Hui Ye"
Date:
Subject: Issue with batch update and timestamp escape syntax error
Next
From: Kris Jurka
Date:
Subject: Re: Issue with batch update and timestamp escape syntax error