I think you're using a very old version of mappostgis.c - grab a newer one from the mapserver CVS. You're probably running into the old upper/lowercase problem, try: DATA "geo from (select id, geo, dtime from tstory) as foo USING SRID=4326 USING UNIQUE id" dave