[OSM-dev] osm2pgsql hstore support
Sven Geggus
lists at fuchsschwanzdomain.de
Sun Mar 14 15:47:22 GMT 2010
Hello,
I just commited a patch for osm2pgsl for optional generation of a
hstore column (hstore new).
For those of you who don't know about hstore colums yet:
Hstore is for sets of key/value pairs. As associative array datatype,
just like a hash in perl or dictionary in python.
This should come in handy especialy for rarely used tags.
Using hstore one can use any tag in sql queries like this:
gis=> select count(*) FROM planet_osm_point where ((tags->'man_made') = 'tower');
count
-------
447
(1 Zeile)
Indexes can be added to hstores as well.
Currently the patch has not been tested in conjunction with
incemental database updates.
Regards
Sven
--
"Those who do not understand Unix are condemned to reinvent it, poorly"
(Henry Spencer)
/me is giggls at ircnet, http://sven.gegg.us/ on the Web
More information about the dev
mailing list