Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Change setsrid to st_setsrid #1375

nlebedev opened this Issue · 2 comments

2 participants



When I try to add a layer from postgis 2 db I get an error:

Postgis Plugin: PSQL error:
ERROR: function setsrid(box3d, integer) does not exist
LINE 1: ..."id" from osm_landusages_gen0 WHERE "geometry" && SetSRID('B...
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Full sql was: 'SELECT ST_AsBinary("geometry") AS geom,"id" from osm_landusages_gen0 WHERE "geometry" && SetSRID('BOX3D(3882800.95516543 7185926.18618899,4573801.12435579 7790787.80869334)'::box3d, 900913)'

Function SetSRID is ST_SetSRID in postgis 2 default install. Maybe this can be changed somehow?


This wil be fixed in the next release of TileMill. In the meantime you can add the legacy_minimal.sql into your database (this script comes with PostGIS 2.0) to work around this. closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.