Proposed change to the JDBC driver - Mailing list pgsql-hackers

From Peter Mount
Subject Proposed change to the JDBC driver
Date
Msg-id 1B3D5E532D18D311861A00600865478C70C0EA@exchange1.nt.maidstone.gov.uk
Whole thread Raw
Responses Re: [HACKERS] Proposed change to the JDBC driver
List pgsql-hackers
I'm sending this to both the hackers and interfaces lists as this
affects the 7.0 release and an interface.

Ok, up until now the driver has operated under a base package of
postgresql. This has worked fine so far but technically breaks Sun's
rules on package naming. The rule is that any organisations package
names begins with their domain name. This prevents two different package
names from clashing.

Ie: My own classes always begin with uk.org.retep as my own domain is
retep.org.uk. The classes I write here begin with uk.gov.maidstone.

Now, what I'm thinking is that as the 7.0 driver isn't going to be
compatible with earlier backends (mainly due to the core changes like
date/time handling, but there are others), I'm proposing to change our
base package name from postgresql to org.postgresql so that we comply
with this rule (which has been around since Java first came out).

All this involves in the source is to create an empty directory called
org, and move the original postgresql directory into it. Then each .java
file will need org. prefixed to the package name.

The down side, is that any existing source that uses the driver will
need amending so that either the Class.forName() line reads:
Class.forName("org.postgresql");

or if it's supplied as a parameter (which is my prefered way) the org.
added.

Now because of this downside, I want to see what everyone thinks about
making this change before I do it, as I have a lot of things to do to
the source to implement it, but it would be better to do it now,
especially as it's the first new major release since JDBC was included.

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.




pgsql-hackers by date:

Previous
From: "Ansley, Michael"
Date:
Subject: RE: [HACKERS] Daily regression testing via vmware - useful?
Next
From: "Ansley, Michael"
Date:
Subject: RE: [HACKERS] [hackers]development suggestion needed (filepath as symlink)