[GIS] What are the Pros and Cons of hstore data type in postgis

databaseopen-source-gispostgispostgresql

PostgreSQL has a module named hstore that implement the use of key/value pairs (it's something like the OpenStreetMap model, but in a single table).

What are the Pros and Cons of hstore regarding GIS compatibilities, data adding and retrieving?

Best Answer

Pros:

It's a high performance and flexible key/value that can be indexed and queried.

I have a complex schemaless web GIS that uses an HStore column for storing the features properties.

Cons:

Most WMS/WFS tools like Mapserver, Geoserver and similars can't understand and work with HStore columns, so you end up creating hard coded SQL Views (In Geoserver at least). You can still use it for working WMS/WFS but since you have to hardcode the keys you lose the schemaless capabilities.