From: Markus Schaber <schabios@logi-track.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Cc: Kris Jurka <books@ejurka.com>
Subject: Re: Avoiding explicit addDataType calls for PostGIS
Date: Wed, 3 Nov 2004 12:28:16 +0100
Message-ID: <20041103122816.1c6ab2de@kingfisher.intern.logi-track.com> (raw)
In-Reply-To: <417588E7.7020205@opencloud.com>
References: <20041006181653.4fc83924@kingfisher.intern.logi-track.com>
<41645F7A.2040106@opencloud.com>
<20041007104603.78af41f3@kingfisher.intern.logi-track.com>
<416B63BF.4090304@opencloud.com>
<Pine.BSO.4.56.0410190144280.28027@leary.csoft.net>
<417588E7.7020205@opencloud.com>
Hi, Oliver,
On Wed, 20 Oct 2004 10:36:39 +1300
Oliver Jowett <oliver@opencloud.com> wrote:
> > 1) Is the name postgresql.properties with no package name a good idea? It
> > doesn't seem ideal for an application to have to create an org/postgresql
> > directory just to hold a properties file,
>
> Yes, that's what I was trying to avoid.
But, usually, it will be extension and library writers and not the
application writers that provide the postgresql.properties file.
I think most applications will use URL or Properties to express their
specific wishes.
So I'd prefer to put it into org/postgresql.
> For the datatype.* properties, how do we map them to datasource
> accessors? Having many separate properties is nice from the point of
> view of being able to incrementally add to the property via different
> defaults files, but it's nasty to map to a JavaBean-like accessors (and
> also makes Driver.getPropertyInfo() impossible to completely implement).
Well, we could get nearer to a perfect getPropertyInfo() when we take
all the datatype.* declarations we read from the properties files. This
way, any extension completes the list with its own datatypes, and a
developer / admin can add further ones if needed. (Maybe we should allow
empty datatypes.type declarations for this case).
> Perhaps an array-based accessor, one element per datatype?
Or a Map, so we can index via name.
> Alternatively, collapse all the datatype stuff down to a single property
> and teach the property-munging code how to merge (rather than replace)
> multiple settings of that property together. (this second option is more
> like what JNDI property files do)
This sounds cleaner, IMHO. This would produce (and allow) to specify
something like datatypes=geom:org.postgis.PGgeometry,blubb=com.foo.bar
Should I try to change the patch this way?
Thanks,
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
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, oliver@opencloud.com, books@ejurka.com
Subject: Re: Avoiding explicit addDataType calls for PostGIS
In-Reply-To: <20041103122816.1c6ab2de@kingfisher.intern.logi-track.com>
References: <20041006181653.4fc83924@kingfisher.intern.logi-track.com> <41645F7A.2040106@opencloud.com> <20041007104603.78af41f3@kingfisher.intern.logi-track.com> <416B63BF.4090304@opencloud.com> <Pine.BSO.4.56.0410190144280.28027@leary.csoft.net> <417588E7.7020205@opencloud.com> <20041103122816.1c6ab2de@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