X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 282093A4079 for ; Wed, 3 Nov 2004 11:28:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08362-06 for ; Wed, 3 Nov 2004 11:28:22 +0000 (GMT) Received: from mail.logi-track.com (burro.logi-track.com [213.239.193.212]) by svr1.postgresql.org (Postfix) with ESMTP id 1CD033A3F56 for ; Wed, 3 Nov 2004 11:28:23 +0000 (GMT) Received: from kingfisher.intern.logi-track.com (J2902.j.pppool.de [85.74.41.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logi-track.com (Postfix) with ESMTP id D1905301B2; Wed, 3 Nov 2004 12:28:23 +0100 (CET) Received: from kingfisher.intern.logi-track.com (localhost [127.0.0.1]) by kingfisher.intern.logi-track.com (Postfix) with SMTP id 6167A16E215; Wed, 3 Nov 2004 12:28:17 +0100 (CET) Date: Wed, 3 Nov 2004 12:28:16 +0100 From: Markus Schaber To: Oliver Jowett Cc: pgsql-jdbc@postgresql.org, Kris Jurka Subject: Re: Avoiding explicit addDataType calls for PostGIS Message-ID: <20041103122816.1c6ab2de@kingfisher.intern.logi-track.com> 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> <417588E7.7020205@opencloud.com> Organization: logi-track ag, =?ISO-8859-15?Q?z=FCrich?= X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) X-Face: Nx5T&>Nj$VrVPv}sC3IL&)TqHHOKCz/|)R$i"*r@w0{*I6w; UNU_hdl1J4NI_m{IMztq=>cmM}1gCLbAF+9\#CGkG8}Y{x%SuQ>1#t:; Z(|\qdd[i]HStki~#w1$TPF}:0w-7"S\Ev|_a$K wrote: > > 1) Is the name postgresql.properties with no package name a good idea? = It=20 > > doesn't seem ideal for an application to have to create an org/postgres= ql=20 > > directory just to hold a properties file, >=20 > 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=20 > accessors? Having many separate properties is nice from the point of=20 > view of being able to incrementally add to the property via different=20 > defaults files, but it's nasty to map to a JavaBean-like accessors (and=20 > also makes Driver.getPropertyInfo() impossible to completely implement).= =20 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= =20 > and teach the property-munging code how to merge (rather than replace)=20 > multiple settings of that property together. (this second option is more= =20 > like what JNDI property files do) This sounds cleaner, IMHO. This would produce (and allow) to specify something like datatypes=3Dgeom:org.postgis.PGgeometry,blubb=3Dcom.foo.bar Should I try to change the patch this way? Thanks, Markus --=20 markus schaber | dipl. informatiker logi-track ag | rennweg 14-16 | ch 8001 z=FCrich phone +41-43-888 62 52 | fax +41-43-888 62 53 mailto:schabios@logi-track.com | www.logi-track.com