[postgis-users] org.postgresql.Connection missing in PostGIS jar

Cathy Y. Walters cyw at dls.net
Wed Apr 26 07:03:38 PDT 2006


Thanks Markus.

Anywhere I can find some working samples?

CYW

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Markus
Schaber
Sent: Wednesday, April 26, 2006 4:43 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] org.postgresql.Connection missing in PostGIS
jar

Hi, Cathy,

Cathy Y. Walters wrote:
> There does exist a PGConnection class in postgresql jar, but the sample
code
> in the manual uses org.postgresql.Connection.
>
> Does the sample code work?

The sample code is rather old, the class was called Connection in
PostgreSQL 7.2. Either 7.3 or 7.4 renamed the Class to PGConnection.

We should update that parts of the manual, but due to time constraints I
did not do it up to now. The README file in the jdbc2 directory is up to
date.

The example code and regression tests in the jdbc2 subdirectory shold
work fine (at least they did when I last checked), if any of them don't
work, please report it as a bug here.

If you're interested in more details, read on:

The reason for stubbin/org/postgresql/Connection.class to exist is that
we wanted to Compile PostGIS in a way that runs against all 7.2 up to
8.1 (and future) pgjdbc versions.

So we compile "fake" PGConnection / Connection classes which mimic the
necessary fragments of the pgjdbc interface, found in the stubsrc
directory, into the stubbin, and compile PostGIS against those.

For running, you need a postgresql.jar/pgjdbc.jar of any supported
version, PostGIS will use magic trickery and rely on the dynamic class
loading to find out which one to actually use.

Personally, I'd prefer to drop all that black magic now, and depend on a
reasonably new pgjdbc driver[1]. But there was some resistance from
distro packagers, which wanted to backport PostGIS to distributions
which only contain PostgreSQL 7.2.


HTH,
Markus

[1] Probably 8.0 or 8.1, which can be used against older servers.


-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list