Unix Technical Forum

Re: PGConnection vs. Connection

This is a discussion on Re: PGConnection vs. Connection within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Markus Schaber wrote: > the addDataType() methods are carried by the > org.postgresql.Connection class instead of the > org.postgresql.PGConnection ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:03 PM
Oliver Jowett
 
Posts: n/a
Default Re: PGConnection vs. Connection

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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:19 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com