hstore is data type for storing sets of key/value pairs in Postgres, similar to hashes in Ruby and Perl, associative arrays in PHP or dictionaries in Python.

learn more… | top users | synonyms

2
votes
1answer
45 views

What is the etymology of the hstore datatype in postgres?

Where did the datatype get its name? Hash store?
0
votes
0answers
10 views

hstore type does not exist with hstore installed postgresql

I recently had to copy over a databases structure from one database to another with the command pg_dump -c -S database_name > pg_dump_date.sql I then ran the dump file on the new database with ...
0
votes
1answer
11 views

Adding hstore entries to an uninitialized column

I got bitten by this 'feature' recently. If your hstore column is uninitialized and you start adding entries to it, they are all silently swallowed without error. Is this expected? create table ...
0
votes
1answer
14 views

Remove all values of a key in PostgreSQL hstore

How do I delete/remove the value of a postgresql hstore column? I've got a table named pages and a column named settings - I need to remove the read_only value (basically, set it to empty string or ...
1
vote
1answer
26 views

Removing a Key From HSTORE in Postgresql

At the moment I have an hstore that describes the properties of various items. When searching I need to remove values that are unique to a each item (such as serial number, vin, and so on). According ...
0
votes
0answers
18 views

Hstore or multiple columns for this scenario?

I have a table called Template which needs quite a lot of attributes in order to describe the template itself. Most of the attributes are boolean, such as: template_requires_images, ...
5
votes
1answer
249 views

HStore vs. multiple tables with inheritance - do I have a good use case for HStore?

My broader question here has to do with when it is appropriate to use HStore vs. multiple tables vs. one table for storing document-like objects. Now, for my localized example: I’m designing a ...
1
vote
0answers
96 views

PostgreSQL 9.3 slaves don't recognize hstore as a type

I am using the postgres built in replication with two slave nodes and a single master. On the master node (as well as the slaves) the hstore extension is installed. But whenever a query using hstore ...
1
vote
2answers
203 views

Extract all tags from hstore field

I need to extract (copy) all hstore tags by object id from a postgres 9.2+postgis 2.1 database into an external file for post-processing. Since the keys and values vary per record, and I don't know ...
0
votes
1answer
174 views

Attributes from an hstore-column as separate columns in a view?

Let's assume we have a table where it has two columns, one an ID and one an hstore column, which stores key/value pairs. You could query that column as such: SELECT name, attributes->'device' as ...
2
votes
1answer
288 views

Strange Postgres Hstore syntax with curly braces {key=value}

I'm using the following program https://sourceforge.net/projects/jailer/ to extract a subset of data from my database with correct associations following my foreign key constraints. The program ...
0
votes
1answer
142 views

Optimizing PostgreSQL hstore for lots of small updates

I have a situation where I will have one web session per row, but this session will generate dozens of updates to an hstore field in that row, one k/v at a time. At the end, I will have a completed ...
2
votes
1answer
1k views

Postgres nested hstore select query

I have a carts table with items hstore column. An example entry in this column is: carts.items row#1 = { "1614" => {:quantity=>"100", :price_cents=>1655}, ...