Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2888 closed defect (worksforme)

postgis DATA statements do not allow quoted strings embedded in them

Reported by: woodbri Owned by: pramsey
Priority: normal Milestone:
Component: PostGIS Interface Version: 5.2
Severity: major Keywords:


The following issue has been raise multiple times in recent weeks. This seems like it is a pretty major limitation.

Travis Kirstine <traviskirstine@…> 02/12/09 1:45 PM >>>

The following line does not work and I think it has something to do with the single quotes. When I use double quotes Postgres thinks I'm referring to a column name. Is there a way to escape the single quotes?

DATA "geom from (select id as oid, geom from some_table where
some_field = 'some_string') as myquery using SRID=-1"

The following line works because I'm doing a numeric comparison.

DATA "geom from (select id as oid, geom from some_table where
some_field_number = 99) as myquery using SRID=-1"

Change History (4)

comment:1 Changed 9 years ago by pramsey

Not a problem in 5.4+

comment:2 Changed 9 years ago by pramsey

Owner: changed from mapserver-bugs@… to pramsey

comment:3 Changed 9 years ago by pramsey

Resolution: worksforme
Status: newclosed

Actually, this works for me in 5.2 also. Are you sure you're reporting the right symptom?

    DATA "the_geom from (select * from states where state_name = 'Nebraska') as 
subsql using srid=4326 using unique gid"

comment:4 Changed 9 years ago by woodbri

I'm using 5.2.2 and just happen to be working with postgis queries that have single quoted strings in them and it works for me. This was a real problem at the time I posted it because I'm pretty sure I tested it to verify the problem, so I'm guessing that the mapfile parser was tweaked to fix this without closing the bug.

Note: See TracTickets for help on using tickets.