[gdal-dev] Added hstore_get_value(hstore, key) SQL function

Even Rouault even.rouault at mines-paris.org
Sun Jun 8 10:03:22 PDT 2014


Hi,

I've just added the hstore_get_value() to both OGR SQL and SQLite dialects. 
This can be especially useful with the OSM driver to extract values associated 
to a key from the other_tags attribute that has a HSTORE formatting ( 
http://www.postgresql.org/docs/9.0/interactive/hstore.html )

From the doc:
"""
Starting with OGR 2.0, the hstore_get_value() function can be used to extract 
a value associate to a key from a HSTORE string, formatted like 
"key=>value,other_key=>other_value,..."
SELECT hstore_get_value('a => b, "key with space"=> "value with space"', 'key with space') --> 'value with space'
"""

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140608/38d5bd6a/attachment.html>


More information about the gdal-dev mailing list