openstreetmap/osm2pgsql — Issue #2: Bad SQL statement when importing with tablespaces
Author: simonpoole
Created: 2012-01-06 19:04:35+00:00
State: open

Copying planet_osm_polygon to cluster by geometry finished
CREATE INDEX planet_osm_polygon_no_building_index ON planet_osm_polygon USING GIST (way) WHERE building is null TABLESPACE gisidx;
failed: ERROR: syntax error at or near "TABLESPACE"
LINE 1: ...m_polygon USING GIST (way) WHERE building is null TABLESPACE...
^

The TABLESPACE spec belongs before the WHERE clause.