pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Mikko Tiihonen <mikko.tiihonen@iki.fi>
Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Re: Clean up wasNullFlag usage
Date: Fri, 27 Jul 2007 04:56:51 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0707270455120.2617@leary.csoft.net> (raw)
In-Reply-To: <1185017518.1632.61.camel@dual.local>
References: <1185017518.1632.61.camel@dual.local>



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




view thread (2+ messages)

Message-ID: <Pine.BSO.4.64.0707270455120.2617@leary.csoft.net>
Permalink:  ../Pine.BSO.4.64.0707270455120.2617@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0707270455120.2617@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, mikko.tiihonen@iki.fi
  Subject: Re: Clean up wasNullFlag usage
  In-Reply-To: <Pine.BSO.4.64.0707270455120.2617@leary.csoft.net>
  References: <1185017518.1632.61.camel@dual.local> <Pine.BSO.4.64.0707270455120.2617@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox