[fdo-internals] xmin and xmax are reserved keywords
Brent Robinson
brent.robinson at autodesk.com
Mon Jan 15 11:38:18 EST 2007
Mateusz,
That would work for me. This issue is likely to come up again for future
providers, since other RDBMS's may also reserve some of the column names
currently in the FDO MetaSchema. Allowing the provider to customize the
MetaSchema table and column names would provide a relatively easy way to
resolve these issues. The MetaSchema tables are created by fdo_sys.sql
but, fortunately, provider-specific customizations to this file are
allowed.
Brent.
-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Mateusz
Loskot
Sent: Monday, January 15, 2007 10:40 AM
To: FDO Internals Mail List
Subject: Re: [fdo-internals] xmin and xmax are reserved keywords
Brent Robinson wrote:
> Hi Mateusz,
>
> Does PostGIS support double quote delimiting for table and column
names
> in select statements?
>
> If it does then another option might be to double-quote delimit these
> names in the select statements issued by the Schema Manager. This
would
> be a fairly small change to utilities/SchemaMgr/src/Ph/Field.cpp.
Brent,
As Paul already explained, it's not feasible.
What about a simple indirection - querying provider's Schema
manager for column name. For example:
1. ctor of FdoSmPhSpatialContextGroupReader already accepts physical
manager of given provider.
2. In the class FdoSmPhSpatialContextGroupReader, the pointer to this
manager could be saved.
3. Next, whenever functions like
FdoSmPhSpatialContextGroupReader::GetXMin() are called, first, the
reader asks physical manager for column name using ie. enumerator to
identify which column name is requested.
Here, I assume the set of column names in f_* meta schema is well-known
and constant.
4. In the FdoSmPhMgr, we can add new API similar to GetDcColumnName() or
extend existing GetDcColumnName(), which can be called from GetXMin()
and return default *or* provider's specific column name.
5. If no implementation is provided by a FDO provider, then default
column name is returned by manager itself.
6. If a provider (re)implements the column name API in FdoSmPhMgr,
class, then provider's specific name is used in in the
FdoSmPhSpatialContextGroupReader class.
Would it work for you?
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
fdo-internals mailing list
fdo-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-internals
More information about the fdo-internals
mailing list