[fdo-internals] xmin and xmax are reserved keywords

Mateusz Loskot mateusz at loskot.net
Sun Jan 14 13:14:51 EST 2007


Hi,

For a few recent days, I've been trying to find out how to override
default behavior (implementation) of classes relates to SpatialContext,
SpatialContextGeomReader/Writer, SpatialContextGroupReader/Writer,
SpatialContextCollection.

The reason is that these classes use hardcoded column names
which are reserved keywords in PostgreSQL, like xmin, xmax.
Here is the list:

http://www.postgresql.org/docs/8.2/interactive/ddl-system-columns.html

Now, the only solution I can see is to rename these columns
in the FDO Core's Schema Manger types for spatial context management.
Even though, I understand how it influences the rest of FDO components,
I don't see how could I solve it better.
Unfortunately, there is no way to make these names not reserved
words on PostgreSQL side.

Do you think it's possible to solve this problem and use different
column names for PostgreSQL/PostGIS provider only?

If there isn't any such solution, I'd like to call for motion to rename
these columns to something safer - for instance, with fdo_ prefix.


As I see in the King Oracle provider, the problem is solved differently.
The King Oracle provides its own implementation, completely unrelated to
Generic RDBMS or even to Schema Manger in FDO Core utilities.

Higher abstractions of FDO just are get ready to use spatial context and
spatial context reader objects implementing FDO API.

Unfortunately, this is not an option for me - not counting complete
rewrite of my provider in the same way the King Oracle is implemented
(may be if I'd have a free month I could do it :-) )

Please, I'd be very thankful for a piece of advice how to solve my
problems, because it has stopped me completely now.

Cheers

p.s. I'm posting this message to both addresses:
the new - fdo-internals at lists.osgeo.org,
and the old - fdo_dev at lists.osgeo.org (just to be sure it will arrive),
only this time. Next messages will go to the new address.

-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the fdo-internals mailing list