Re: tightening up on use of oid 0

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: tightening up on use of oid 0
Date: 2004-10-14 11:49:18
Message-ID: Pine.BSO.4.56.0410140606380.31883@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 14 Oct 2004, Oliver Jowett wrote:

> Kris Jurka wrote:
>
> > I was looking at the assorted changes to the PGobject extensions and I'm
> > unclear on exactly how NULL is handled. Consider PGmoney has tests for
> > NULL in equals, clone, and getValue, but PGbox does not. Is this simply
> > an oversight or is there something more profound going on here.
>
> I ended up with two approaches for this.

I don't like the lack of consistency here, "new PGbox()" is NULL, but "new
PGmoney()" is zero instead. I also don't like the ability to mutate away
NULLness. This means another application can break mine by modifying the
shared PGbox.NULL object.

> It's hardly ideal but it kept the changes to a minimum. If you don't
> mind a more invasive set of changes, I can probably come up with
> something better.

Yes, let's think about this a little more. I unfortunately don't have any
brilliant ideas, perhaps just adding a boolean everywhere is simplest.

Kris Jurka

Here's a merged version of the patch, if it helps:

http://www.ejurka.com/pgsql/patches/

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-10-14 12:10:31 Re: problem with dates when using a java calendar object with
Previous Message Oliver Jowett 2004-10-14 10:56:00 Re: tightening up on use of oid 0