[postgis-users] PostgreSQL HStore and PostGIS

Ricardo Bayley ricardo.bayley at gmail.com
Fri Oct 26 13:20:09 PDT 2012


Blair,

If I understood correctly you dont intend to store geometries in HStore but
in the standard geometry PostGIS enabled column.
Storing  key/value pairs in hstore should not bring any issues. You can
also index such hstore field for quick searches.
In order to properly get / set data in Hstore fields, read the
documentation. Since 9.1 (i think) hstore  set/get are diffrent from
previous versions.

I guess it all comes to how large will your table be, but my first
impression is you should be fine if your are just "storing" unstructured
data.


Hope this helped.


Ricardo



2012/10/25 Stephen Frost <sfrost at snowman.net>

> Blair,
>
> * Blair Deaver (blairdeaver at gmail.com) wrote:
> > With that said, I have been looking into the new capabilities available
> > with PostgreSQL HStore
>
> Uhm..  hstore isn't exactly new.  It's been around since something like
> 8.0..  It is amusing how people are just now coming to see. :)
>
> >    - Can anyone comment on successful or unsuccessful attempts to
> implement
> >    such a technology approach integrating PostGIS with HStore?
>
> I've not heard of anyone putting geometries into hstore's.  It'd be
> possible, but realize that to put something into an hstore, it has to be
> text.  Also, I don't think you'd be able to create a geometry index over
> geometries which are inside of an hstore..  Or at least, if you did, it
> might be difficult to actually use.
>
> >    - How would one extract data out in such a manner (I suspect a custom
> >    program would need to be run)?
>
> Not sure what you mean by this, but you'd need to query the hstore using
> the key that you want and then pull the geometry out as text and cast it
> to an actual geometry column to use it.  If you just want the data out
> in a text format, you'd run asewkt() on the geometry after you pull it
> out of the hstore.
>
>         Thanks,
>
>                 Stephen
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121026/351e7f11/attachment.html>


More information about the postgis-users mailing list