Note to self re: postgis

RTFM !! … eg. check the reserved postgreSQL name list before bashing your head against a wall.

I had been trying in vain for hours trying to get a simple evaluation query displaying in Mapserver. It wasn’t as if postgis never worked, in fact the other 20 layers in the mapfile worked flawlessly. Just this little sucker ..

CONNECTION “host=localhost dbname=adsf user=chris password=”
DATA “the_geom FROM pgmrs”

NAME ‘Central City Area’
EXPRESSION (’[desc]’ eq ‘Central City Area’)
COLOR 102 153 255
OUTLINECOLOR 102 153 255

Spot the problem yet? :)

DESC is a reserved keyword for pretty much everything SQL, but alas it had completely slipped my mind. When mapserver passes the CURSOR SELECT statement, it still sends the desc::text and postgre throws an error, its just a shame it isnt a “meaningful error”


So theres another tip to add to your ‘doh, i cant believe i did that‘ list

Now all i need to do is figure out why ms4.4.2 still doesnt like it when 4.6&4.8 both work :(