OracleSpatial driver - VARCHAR2(4000)

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Thu Aug 23 01:20:14 EDT 2007


Your solution is ok and is the only way to read values longer than 256
bytes from Oracle. We should definitely consider upping the the length
of TEXT_SIZE to 4000 once for all. Please file a ticket at
http://trac.osgeo.org/mapserver so that we can include it in the next
releases.

Regards,
Umberto

On 8/22/07, Jim Klassen <Jim.Klassen at ci.stpaul.mn.us> wrote:
>
>
> I am trying to access a spatial table with a VARCHAR2(4000) column from one
> of our Oracle spatial databases. Things work great for mode=map, but for
> mode=nquery I am getting an error returned by mapserver in
> msOracleSpatialLayerGetShape() that Oracle had to truncate one of the
> fields.
>
> I noticed that in maporaclespatial.c TEXT_SIZE is defined to be 256 and this
> seems to be used to determine the size of the pointers and the max allowed
> column length passed to oracle in OCIDefineByPos(...) on line 2155 in
> msOracleSpatialLayerGetShape(). So, I changed TEXT_SIZE to 4000, and
> recompiled Mapserver and now I get the expected result of the entire value
> of the column being substituted into the nquery template.
>
> Are there any negative consequences of making this change (except for
> greater memory usage) that I am not thinking about?
>
> Is there an easier way to allow columns with values > 256 characters to be
> displayed in an nquery template that I overlooked?
>
> I am using Oracle 10gR1 and Mapserver 4.10.2.
>
>



More information about the mapserver-dev mailing list