Re: Avoiding explicit addDataType calls for PostGIS

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Avoiding explicit addDataType calls for PostGIS
Дата
Msg-id 20041103122816.1c6ab2de@kingfisher.intern.logi-track.com
обсуждение исходный текст
Ответ на Re: Avoiding explicit addDataType calls for PostGIS  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Avoiding explicit addDataType calls for PostGIS
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Jan de Visser
Дата:
Сообщение: Re: 1300 to 3100 lines of code for XA support
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: stable release