[postgis-users] Quoting column names in MapServer PostGISSupport

Daniel Morissette morissette at dmsolutions.ca
Thu May 16 09:48:44 PDT 2002


Dave Blasby wrote:
> 
> In the past, others have asked for quoting column names too.
> The PostGIS connector just passes the column names it gets from
> mapserver to the database.
> 
> I could pass the buck and ask, "why is mapserver *removing* the quotes
> from column names?"
> Are you putting quotes in your DATASET line?  Or does mapserver not like
> the quotes-in-quotes?
> 

That's a good candidate for the MapServer bugzilla... I don't think
there is any way to escape quotes in a MapServer mapfile... or no way
that I'm aware of at least.

However, MapServer supports two types of quotes, so you might be able to
resolve this issue by enclosing your SQL statement inside single quotes
in the mapfile, this would allow you to use double quotes inside the SQL
string.  I didn't test this, but I would hope that the mapfile parser is
able to deal with that situation.

Another option might be to use single quotes instead of double quotes
around the field names if that's supported by the PostgreSQL SQL parser.

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.





More information about the postgis-users mailing list