I have a PostgreSQL 9.6 database with tables created by imposm that include a hstore column. This hstore column looks fine in pgAdmin4.


In QGIS 3.6 or 3.12, it shows up in the attributes table 2, but differently : no more " =>" but a simple colon. The issue is that this field is not query-able by QGIS, as no information shows up while filtering 3

Field properties inform that the field is not a Qstring but a QvariantMap type. 4

Is there a way to fix this to get a fully usable hstore column in QGIS?

1 Answer 1


You can use the SQL syntax to query/filter the hstore column

"hstore" -> 'amenity' = 'clinic'

PS: naming a column using a data type name can only lead to issues...

For rule based styling (and other functions where the filtering is done in QGIS and not in the DB), you would use the QGIS syntax:

map_get("hstore",'amenity') = 'clinic'
  • Thanks for the SQL tip (that does work) and the naming advice: I renamed my hstore column tags_hstore, does it seem OK?
    – Severin
    Apr 28, 2020 at 17:32
  • @Severin yes, with the new column name there is no risk of confusing the DB between a column or a function/type name!
    – JGH
    Apr 28, 2020 at 17:52
  • The SQL tip does not work though in the Expression String builder (for query or rule-based symbology) that informs that: Expression is invalid. Can it be adapted to work there as well?
    – Severin
    Apr 28, 2020 at 17:54
  • @Severin see edit with the QGIS syntax
    – JGH
    Apr 28, 2020 at 18:29
  • That's perfect, thank you!
    – Severin
    Apr 28, 2020 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.