OracleSpatial driver - VARCHAR2(4000)

Jim Klassen Jim.Klassen at CI.STPAUL.MN.US
Thu Aug 23 15:42:11 EDT 2007


Thanks for the quick responses. Since memory usage is the main tradeoff
then, for my current project, being able to access the 4000 character
columns outweighs the 16x increase in memory use.
 
I created ticket #2260 as Umberto suggested to further discussion on
this item.
 
This is the first ticket I have created, so let me know if there is
something amiss.

>>> On 8/23/2007 at 11:48 AM, Fernando Simon <fsimon at univali.br>
wrote:
Hi all,
    The way that Jim used is the correct way. The purpose of the 
TEXT_SIZE is this, permit to read big strings. If remember, the default

value (256), is because the cell space in DBF, for shapes, can't store

values bigger than 256.
    The unique problem is that the usage of memory will increase, the 
Oracle driver will always use the 4000 bytes.
    We can improve this value (like 1024), but I believe that will
cover 
just special cases, and the memory will be allocate without use.
    Best regards.

Fernando Simon

Umberto Nicoletti wrote:
> 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.
>>
>>
>>     
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20070823/f061ac2b/attachment.html


More information about the mapserver-dev mailing list