Описание тега hstore

NoneHstore 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.

The hstore PostgreSQL module implements a data type for storing sets of key/value pairs within a single PostgreSQL value. It can be used similar to how you would use a dictionary within another language, though it's specific to a column on a row. This can be useful in various scenarios, such as rows with many attributes that are rarely examined, or semi-structured data. Keys and values are simply text strings.

Example: To enable HStore on postgres, use:

CREATE EXTENSION hstore;

also mention attributes hstore while creating the table as shown below:

CREATE TABLE products (
  id serial PRIMARY KEY,
  name varchar,
  attributes hstore
);