mapbox/tilemill — Issue #1157: PostGIS subquery error
Author: planemad
Created: 2012-01-17 10:08:17+00:00
State: open

On a loaded planet_osm_polygon db:

( SELECT * FROM planet_osm_polygon WHERE natural='water') AS test

gives this error:

Error: Postgis Plugin: PSQL error:
ERROR: syntax error at or near "="
LINE 1: ...M ( SELECT * FROM planet_osm_polygon WHERE natural='water') ... ^
Full sql was: 'SELECT * FROM ( SELECT * FROM planet_osm_polygon WHERE natural='water') AS test LIMIT 0'

but this one works perfectly:
( SELECT * FROM planet_osm_polygon WHERE landuse='reservoir') AS test

Is this a bug?