Skip to content


Accept multi-line SQL queries in table parameter #173

artemp opened this Issue · 4 comments

1 participant

Mapnik member

Currently, it seems necessary to pre-process SQL by removing line breaks.

Mapnik member

[springmeyer] Migurski, I'm interested in looking into this.

What error's do you get currently, or does mapnik fail silently to render when postgres queries fail?

Mapnik member

[migurski] I don't see an error, but I see behavior consistent with mapnik ignoring any parts of the query after the first line break.

Mapnik member

[springmeyer] Hmm, mike even with crazy multiline queries like in this test mapfile: the mapnik postgis plugin seems to render fine.

Any chance you could post a query gone wrong?

Also, would be great if you could rebuild mapnik with DEBUG=True and then check out the query that mapnik outputs...

ie, based on that example above this is one query that mapnik prints in debug output and it works for me:
select asbinary(the_geom) as geom from (select * from world where
= 'Germany') as


where the_geom && setSRID('BOX3D(-180 -90,180 83.62359619140619)'::box3d,4326)

Mapnik member

[artem] fixed in r862

@artemp artemp closed this
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.