[mapserver-dev] Parsing error with PostGIS DATA statement

Jan Hartmann j.l.h.hartmann at uva.nl
Sat Sep 17 09:21:38 EDT 2011


This is such a weird error that I ask for confirmation before submitting 
a bug. The following declaration of a PostGIS connection does *not* work:

     connectiontype postgis
     connection "..."
     data "    rd_bnd from (
             select gid,bladnr,rd_bnd from tmk.bladgrenzen
         ) as foo using unique gid using srid=28992
     "

while the following works fine:

connectiontype postgis
     connection "..."
     data "    rd_bnd from (
             select gid,bladnr,rd_bnd from tmk.bladgrenzen
         ) as foo using unique gid using srid=28992
     "

Don't try to spot the difference: the mailer automatically changes tabs 
into blanks.

If there are tabs (or newlines) around the first variable in the data 
clause, the query fails: the database is queried with the tab or newline 
added to the variable name and returns the error "variable not found". 
In the subselect you can put as many tabs,newlines or other whitespace 
as you like.

If this is really an error (perhaps I am dizzy from looking for half an 
afternoon at this data statement), there must be more cases where the 
parser doesn't get it right. Can anyone confirm?

Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110917/43d40afb/attachment.html


More information about the mapserver-dev mailing list