QGIS – Resolving PostgreSQL Text Arrays with QGIS Expression Builder

postgispostgresqlqgis

I have a PostGIS layer which contains text arrays. At the moment it is not possible to use field values resolved by the expression builder. If the array contains only one item, the field value will be ok, having two or more values within the array, the field value preview returns an empty string. Do I miss something here or could this be a bug?

enter image description here

Best Answer

Regarding the preview values, yes, it looks like a bug. For int arrays, it's either Null or empty string (even if the array contains only 1 value).

That being said, you can still apply the array_* functions to work with this field (ex: array_contains("sa",'F'))

Related Question