pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: PGobject overhaul (was Re: tightening up on use of oid
Date: Sun, 31 Oct 2004 15:17:02 +1300
Message-ID: <41844B1E.1090204@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0410301013050.10973@leary.csoft.net>
References: <41660A56.5000107@opencloud.com>
	<4167BC1A.4070809@opencloud.com>
	<Pine.BSO.4.56.0410140523520.31883@leary.csoft.net>
	<416E5B40.1060901@opencloud.com>
	<Pine.BSO.4.56.0410140606380.31883@leary.csoft.net>
	<418056E5.9060601@opencloud.com>
	<Pine.BSO.4.56.0410301013050.10973@leary.csoft.net>

Kris Jurka wrote:
> 
> On Thu, 28 Oct 2004, Oliver Jowett wrote:
> 
> 
>>For PGobject it turned into a bit of a general overhaul. Currently I have:
> 
> 
> These changes are way too drastic for something as minor as preventing a 
> user from accidentally mutating a NULL PGobject.

That wasn't really my motivation. It was a general cleanup of PGobject 
and subclasses. The current implementations leave something to be desired.

> These API changes suck 
> for both developers and users.  There's no way to make a PGobject 
> implementation compile against both 7.4 and 8.0 drivers.  Altering the 
> PGline API means user code can't compile against both 7.4 and 8.0 drivers.

The feedback I got earlier was that changing the PGobject API wasn't a 
big deal and that external users of the API (which seems to boil down to 
PostGIS & co only) would just track the changes. Is this not true?

> If we were providing exciting new features, then maybe, but for now we've
> got to find a way to make this work without huge API changes or we should
> abandon the whole idea and go back to your original patch.  What
> immediately comes to mind is making the PGobject interface an abstract
> class with all abstract methods so that a developer can implement a type
> that can work with both driver versions.

That's possible. I'd almost prefer doing a new interface and having 
PGobject be a completely-abstract implementation of it. Having the 
driver-required bit as an interface makes it much easier to integrate 
into whatever representation of the data is convenient to the application.

This might be moot if we look at a mapping mechanism that is external to 
the data objects themselves, as suggested by Markus.

Either way, I can't really justify spending much more time on this: we 
don't use extension types in our code at all, and there is still an 
(admittedly ugly) way to set NULL values for extension types in the 
existing driver.

-O



view thread (5+ messages)

Message-ID: <41844B1E.1090204@opencloud.com>
Permalink:  ../41844B1E.1090204@opencloud.com/
Also on:    postgresql.org/message-id/41844B1E.1090204@opencloud.com

 · 

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: oliver@opencloud.com, books@ejurka.com
  Subject: Re: PGobject overhaul (was Re: tightening up on use of oid
  In-Reply-To: <41844B1E.1090204@opencloud.com>
  References: <41660A56.5000107@opencloud.com> <4167BC1A.4070809@opencloud.com> <Pine.BSO.4.56.0410140523520.31883@leary.csoft.net> <416E5B40.1060901@opencloud.com> <Pine.BSO.4.56.0410140606380.31883@leary.csoft.net> <418056E5.9060601@opencloud.com> <Pine.BSO.4.56.0410301013050.10973@leary.csoft.net> <41844B1E.1090204@opencloud.com>

* 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