Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "H" in "HStore" mean in PostgresDB data type name?

Tags:

postgresql

I tried searching and after some search here I decided to reveal this secret with YOUR help.

like image 683
Tesmen Avatar asked Oct 15 '25 04:10

Tesmen


1 Answers

You can safely bet that hstore is a diminutive for hash-store, hash being a reference to the Perl datatype for key/value pairs.

Oleg Bartunov, co-designer of this datatype, mentions the relationship in the -hackers mailing-list:

have you seen contrib/hstore ? It's perl-like hash data type

Also in the original doc, before the adoption of hstore in the contrib section of PostgreSQL (this page dates back from 2003 or older): http://www.sai.msu.su/~megera/postgres/gist/hstore/README.hstore there are several references to Perl hashes to explain some operators:

* hstore ? text - get value , perl analogy $h{key}
* hstore || hstore - concatenation, perl analogy %a=( %b, %c );
like image 82
Daniel Vérité Avatar answered Oct 18 '25 16:10

Daniel Vérité



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!