{"action":"closed","issue":{"number":560,"created_at":"2011-10-11T15:25:07Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Mapnik 0.7, svn r1502.\r\n\r\nQuery in osm.xml file, works fine with postgis.input from debian sid (0.6.1-1):\r\n\r\n\r\n{{{\r\n      <Parameter name=\"table\">\r\n      (select way,aeroway,amenity,landuse,leisure,man_made,military,\"natural\",power,tourism,name\r\n       from planet_beosm_polygon\r\n       where landuse is not null\r\n          or leisure is not null\r\n          or aeroway in ('apron','aerodrome')\r\n          or man_made='pier'\r\n          or amenity in ('parking','university','college','school','hospital','grave_yard')\r\n          or military in ('barracks','danger_area')\r\n          or \"natural\" in ('field','beach','glacier','heath','mud','wood')\r\n          or power in ('station','sub_station')\r\n          or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo')\r\n       order by z_order,way_area desc\r\n      ) as leisure\r\n      </Parameter>\r\n}}}\r\n\r\nIf I open postgresql console (added limit 10 and removed way column for convenience, the request works in both forms):\r\n\r\n\r\n{{{\r\nmapz@newbie:~/mapnik$ psql -d gis\r\nWelcome to psql 8.3.7, the PostgreSQL interactive terminal.\r\n\r\nType:  \\copyright for distribution terms\r\n       \\h for help with SQL commands\r\n       \\? for help with psql commands\r\n       \\g or terminate with semicolon to execute query\r\n       \\q to quit\r\n\r\ngis=> select aeroway,amenity,landuse,leisure,man_made,military,\"natural\",power,tourism,name\r\ngis->        from planet_beosm_polygon\r\ngis->        where landuse is not null\r\ngis->           or leisure is not null\r\ngis->           or aeroway in ('apron','aerodrome')\r\ngis->           or man_made='pier'\r\ngis->           or amenity in ('parking','university','college','school','hospital','grave_yard')\r\ngis->           or military in ('barracks','danger_area')\r\ngis->           or \"natural\" in ('field','beach','glacier','heath','mud','wood')\r\ngis->           or power in ('station','sub_station')\r\ngis->           or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo')\r\ngis->        order by z_order,way_area desc limit 10;\r\n aeroway | amenity | landuse | leisure | man_made | military | natural | power | tourism | name\r\n---------+---------+---------+---------+----------+----------+---------+-------+---------+------\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         |         |         |          |          | wood    |       |         |\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         |         |         |          |          | wood    |       |         |\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         | forest  |         |          |          |         |       |         |\r\n         |         | forest  |         |          |          | wood    |       |         |\r\n(10 rows)\r\n\r\ngis=>\r\n\r\n}}}\r\n\r\nWhen I try rendering with mapnik:\r\n\r\n\r\n{{{\r\nmapz@newbie:~/mapnik$ python getpdf.py\r\nTraceback (most recent call last):\r\n  File \"getpdf.py\", line 34, in <module>\r\n    mapnik.load_map(mapnik_map, mapfile)\r\nRuntimeError: PSQL error:\r\nERROR:  column \"natural\" does not exist\r\nLINE 2:       (select way,barrier,\"natural\",man_made from planet_beo...\r\n                                  ^\r\nFull sql was: 'select * from\r\n      (select way,barrier,\"natural\",man_made from planet_beosm_line where barrier is not null or \"natural\" in ('hedge','cliff') or man_made='embankment') as roads\r\n       limit 0'\r\n (encountered during parsing of layer 'line features')\r\n\r\n}}}\r\n\r\nA temporary workaround for me is to copy postgis.input from debian binary package. That allows renderd to render everything as expected, but python segfaults then.","comments":3,"title":"PostGIS and queries containing quotes","updated_at":"2011-10-11T15:25:10Z","url":"https://api.github.com/repos/artemp/tickets2issues/issues/560","id":1876515,"assignee":null,"milestone":{"number":9,"created_at":"2011-10-11T14:50:02Z","due_on":"1970-01-01T09:21:03Z","title":"0.7.0","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/tickets2issues/milestones/9","open_issues":0,"closed_issues":71,"description":"= Mapnik 0.7.0 =\r\n\r\nThe 0.7.0 release targets stability and usability of the Mapnik Core and brings notable advancements to the Datasource Plugins.\r\n\r\nSee the Release page: wiki:Release0.7.0\r\n\r\nSee the CHANGELOG: source:tags/release-0.7.0/CHANGELOG\r\n\r\nUsage, either via Python or XML stylesheets should be fully compatible with the 0.6.x series.\r\n\r\nNevertheless, this release brings improvements and fixes to the C++ core that warrant a major release and new a ABI version.\r\n\r\n== Plugins ==\r\n\r\n * Addition of '''GDAL raster overviews''' - You can now rapidly read large raster datasets (#54)\r\n  * Turn multiple geotiffs into a Bigtiff and build overviews with gdaladdo then read with the GDAL plugin\r\n  * Thanks Alberto and Craig for the initial patches and Dražen for great testing\r\n\r\n * Huge set of improvements to '''PostGIS Plugin'''\r\n  * The PostGIS plugin now supports custom placement of the BBOX query\r\n  * It is is able to skip initialization queries if you supply the 'geometry_field','srid',or 'extent'\r\n  * Errors are now thrown for queries with invalid syntax - should help in debugging complex SQL\r\n  * Thanks Migurski, Lennard, Avar and more for great ideas and testing\r\n  * Thanks Robert for awesome support and patches\r\n  *  #242, #260,  #363, #376, #384, #393, #414, #415, #426,  #433, #434, #449, #456\r\n\r\n== Python ==\r\n * Additional support for '''python pickling''' (near complete) (#345)\r\n  * Map pickling still needs some refinement, but most objects are nicely pickleable now\r\n  * Thanks Artem for great improvements using templating\r\n\r\n * Improvements to '''Python linking''' on Mac OSX (#380)\r\n  * Smarter default linking to the right Python framework (helps if multiple versions exist like on Snow Leopard + python 2.6)\r\n\r\n * Improvements to python docstrings\r\n  * Thanks Igor for contributing many more docstrings!\r\n\r\n== Core ==\r\n * Completed adding full support for '''PPC/ Big endian''' systems (#357)\r\n  * Ability to read binary data was completed for 0.6.1, but color support needed work and is now finished\r\n\r\n * Large extension to '''TextSymbolizer''' functionality by David Eastcott (r1341) and Jochen (r1254)\r\n\r\n * New support for semitransparency in png256 output (#477)\r\n\r\n * New 'gamma' attribute on PolygonSymbolizer to allow for seamless polygon edges (#428)\r\n\r\n * Support for writing map '''xml to string''' (#396)\r\n  * Call `mapnik.save_map_to_string(m)` to send a map to an xml stream\r\n \r\n * Support for '''relative paths''' in xml loaded from string(#440)\r\n  * Works with libxml2 entities even! Thanks Dražen!\r\n  * Tested with the latest OSM stylesheet.\r\n\r\n * Variety of bug and usability fixes (#392,#436,#448,#242,#301,#402,#413)\r\n ","state":"closed"},"closed_at":"2011-10-11T15:25:10Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/tickets2issues/issues/560","labels":[{"name":"Agg_Renderer","url":"https://api.github.com/repos/artemp/tickets2issues/labels/Agg_Renderer","color":"FFFFFF"}],"state":"closed"},"legacy":{"number":560,"action":"closed","issue":1876515}}