[mapserver-users] query templates with Postgis

Dave Blasby dblasby at refractions.net
Wed Oct 3 14:44:22 EDT 2001


Paul Ramsey wrote:
> 
> My pseudo-informed guess is that Dave hardcoded a size into his
> character handlers, and you just found it. If I am right, he'll have a
> fix into the CVS version of mapserver before the end of the day... if I
> am wrong, he will chastise me publicly.

Its actually a bug in postgresql.  I've reported the bug and found a
work around.  
I'll modify the mappostgis.c file and commit the changes this afternoon.

dave
ps. For those of you interested, here's how to reproduce the bug:

postgresql-#create table t (v varchar);
postgresql-#insert into t values
('0123456789a0123456789b0123456789c0123456789d');
postgresql-#select v from t;

                      v                       
----------------------------------------------
 0123456789a0123456789b0123456789c0123456789d
(1 row)

So far, so good.

postgresql-#select text(v) from t;

             text               
---------------------------------
 0123456789a0123456789b012345678
(1 row)

Truncation occurs.

Work around:

postgresql-# select v::text from t;
                   ?column?                   
----------------------------------------------
 0123456789a0123456789b0123456789c0123456789d
(1 row)



More information about the mapserver-users mailing list