artemp/mapnik — Issue #804: auto-detection of postgres primary key field (postgis key_field="auto")
Author: artemp
Created: 2011-10-11 16:37:21+00:00
State: open
Labels: Core_Library

With postgres, a`key_field` provided by the user is necessary for ensuring that the postgis plugins feature.id() is globally unique. Currently if not provided a feature_count is simply incremented for each query, so feature id's are not unique across queries.

Ideally we could support something like `key_field="auto"`. If provided the postgis plugin code would query the table and try to deduce the presence of an integer primary key, and if not found would throw upon datasource bind().