[mapserver-dev] Oracle Spatial and CLOB columns

Smith, Michael ERDC-CRREL-NH michael.smith at usace.army.mil
Fri Feb 27 11:01:59 EST 2009


Bart,

I added a patch (currently in 5.4 beta) to filter out BLOBs, I think it
could easily be changed to check for CLOBs as well.

http://trac.osgeo.org/mapserver/ticket/2829

Mike


-- 
Michael Smith
Remote Sensing GIS Center
CRREL - ERDC 
US Army Corps of Engineers
Hanover, NH
w: 603-646-4765



On 2/27/09 5:28 AM, "bartvde at osgis.nl" <bartvde at osgis.nl> wrote:

> Hi list,
> 
> currently, when a table contains a CLOB column, queries on it through
> Mapserver will fail with:
> 
> msOracleSpatialLayerGetShape(): OracleSpatial error. Error: ORA-00932:
> inconsistent datatypes: expected %s got %s
> 
> Ofcourse one can overcome this by not using this column in the subselect
> (DATA statement) or creating a database view, but it is a bit cumbersome
> and hard to maintain.
> 
> Is there not a way that the Mapserver Oracle Spatial driver just ignores
> CLOB columns?
> 
> I've tried to implement this but was unsuccessfull.
> 
> Mapserver gets the columns with
> 
> sprintf( query_str, "SELECT * FROM %s", table_name );
> 
> and OCI_DESCRIBE_ONLY which makes sure the query does not get executed.
> 
> I tried to use something like:
> 
> sprintf(query_str, "select column_name from user_tab_columns where
> table_name = '%s' and (NOT DATA_TYPE = 'CLOB')", table_name );
> 
> but could not adapt the rest of the code to use this.
> 
> Maybe there is another way though.
> 
> Best regards,
> Bart
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list