hstore
data type for storing sets of (key, value) pairs
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
hstore | 1.8 | TYPE | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3970 | hstore | No | Yes | No | Yes | Yes | No | - |
| Related | pgbson collection jsonschema pgjq jsquery pg_jsonschema intarray arraymath pgpdf pglite_fusion |
|---|---|
| Depended By | flux format hstore_hash_ops hstore_ops hstore_pllua hstore_plluau hstore_plperl hstore_plperlu hstore_plpython2u hstore_plpython3u hstore_plpythonu hstore_plruby json_enhancements_with_hstore mbus meta_triggers numhstore pg_auditor pg_readme pg_rowalesce pg_utility_trigger_functions pg_xenophile sys_syn_dblink |
Version
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.8 | 1.8 | 1.8 | 1.8 | 1.8 |
Install
Note: This is a built-in contrib extension of PostgreSQL
Usage
The hstore extension provides a key/value pair data type for storing semi-structured data in a single column.
Basic Usage
Operators
| Operator | Description | Example |
|---|---|---|
-> | Get value by key | h -> 'key' |
|| | Concatenate | h1 || h2 |
? | Contains key | h ? 'key' |
?& | Contains all keys | h ?& ARRAY['a','b'] |
?| | Contains any key | h ?| ARRAY['a','b'] |
@> | Contains | h @> 'a=>1' |
<@ | Contained by | h <@ 'a=>1, b=>2' |
- | Delete key(s) | h - 'key' or h - ARRAY['a','b'] |
Subscript Access
Functions
Index Support
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)