pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabios@logi-track.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: PGobject overhaul (was Re: tightening up on use of oid
Date: Fri, 29 Oct 2004 18:57:58 +0200
Message-ID: <20041029185758.0ae72196@kingfisher.intern.logi-track.com> (raw)
In-Reply-To: <418056E5.9060601@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>

Hi, Oliver,

On Thu, 28 Oct 2004 15:18:13 +1300
Oliver Jowett <oliver@opencloud.com> wrote:

> - Implementations of PGobject should provide a ctor taking a single 
> String; this is called by the driver to construct non-null objects.

Is it possible to use a static factory function instead?

This would make it possible to produce different subclasses depending on
the String, which would be useful e. G. for PostGIS, als all the
geometry classes share the same postgres type "geometry".

> When we come to do binary-format types, I'd expect we would have a 
> subinterface (PGbinaryobject?) that adds whatever methods are needed for 
> binary parameter formatting. Objects that implement PGbinaryobject 
> become candidates for binary transfer.

What do you think about the factory / handler object approach that AFAIR
was discussed here some days ago?

So the driver gets registered one PGfactory for every postgres type, and
this factory then has methods to transform objects to text and binary
representation and vice-versa.

This would allow us to read and write instances of third-party defined
classes that don't implement any postgres specific interface.

We still could have a default factory implementation that gets used
whenever any legacy application uses PGObject subclasses.

Markus

-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com



view thread (5+ messages)  latest in thread

Message-ID: <20041029185758.0ae72196@kingfisher.intern.logi-track.com>
Permalink:  ../20041029185758.0ae72196@kingfisher.intern.logi-track.com/
Also on:    postgresql.org/message-id/20041029185758.0ae72196@kingfisher.intern.logi-track.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: schabios@logi-track.com
  Subject: Re: PGobject overhaul (was Re: tightening up on use of oid
  In-Reply-To: <20041029185758.0ae72196@kingfisher.intern.logi-track.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> <20041029185758.0ae72196@kingfisher.intern.logi-track.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