Skip to content

Drops the whole style or layer when a filter references a non-existent column #242

Closed
artemp opened this Issue Oct 11, 2011 · 5 comments

1 participant

@artemp
Mapnik member
artemp commented Oct 11, 2011

Mapnik SVN trunk appears to drop the whole style or even the whole layer when a filter references a non-existent column in a PostGIS DB. It should at least warn the user about that occurring, and maybe still try to render as much as possible from that style/layer.

(jonb helped me finding that out.)

@artemp
Mapnik member
artemp commented Oct 11, 2011

[springmeyer] pushing off to 0.6.1

@artemp
Mapnik member
artemp commented Oct 11, 2011

[Ldp] Perhaps something like an optional modifier on Filter, to control the behaviour, with the default being to throw an error?

So

[highway]='something' and [some_nonexistent_column] = 'some_value'

would then still succeed and only test for the first term.

@artemp
Mapnik member
artemp commented Oct 11, 2011

[springmeyer] ya, that seems like a good idea

@artemp
Mapnik member
artemp commented Oct 11, 2011

[springmeyer] moving to 0.6.2 for further discussion

@artemp
Mapnik member
artemp commented Oct 11, 2011

[springmeyer] what was actually failing was the postgis query.

now that error reporting/throwing has been in the postgis driver you'll get:

{{{
ERROR: column "foo" does not exist
LINE 1: SELECT AsBinary("geometry",'NDR') AS geom,"foo","region" fro...
^
Full sql was: 'SELECT AsBinary("geometry",'NDR') AS geom,"foo","region" from world_worldborders WHERE "geometry" && SetSRID('BOX3D(-180 -78.1219177246,180 83.6235961914)'::box3d, 4326)'
}}}

@artemp artemp closed this Oct 11, 2011
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.