Re: PGConnection vs. Connection

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: PGConnection vs. Connection
Дата
Msg-id 420D1444.3060806@opencloud.com
обсуждение исходный текст
Ответ на PGConnection vs. Connection  (Markus Schaber <schabios@logi-track.com>)
Ответы Re: PGConnection vs. Connection  (Markus Schaber <schabios@logi-track.com>)
Список pgsql-jdbc
Markus Schaber wrote:

> the addDataType() methods are carried by the
> org.postgresql.Connection class instead of the
> org.postgresql.PGConnection interface in 7.3 and up.

That's unfortunate :(

> - Prodiding a patch that is to be applied manually (rsp. by the debian
>   package build process) when building for 7.2. (this is our "current
>   practice").

That seems the simplest approach. Both the 7.2 driver and server are
truely ancient now -- I think having to manually apply a patch if you
want to run against them isn't unreasonable.

> - Using reflection. This could allow us per run-time distinction to use
>   o.p.PGConnection.addDataType(Class) when running against pgjdbc 8.0,
>   o.p.PGConnection.addDataType(String) against 7.3/7.4, and
>   o.p.Connection.addDataType(String) against 7.2. This way we could ship
>   a single postgis.jar that runs against all pgjdbc versions.

That seems the most flexible approach, but reflection can be a pain to
deal with. For the packaging case, if you are going to build "PostGIS
for 7.2" and "PostGIS for 8.0" as separate packages then there doesn't
seem like much advantage to having a single PostGIS build/jar anyway.

-O

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

Предыдущее
От: Markus Schaber
Дата:
Сообщение: PGConnection vs. Connection
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: PGConnection vs. Connection