]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Allow subscripting of hstore values.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 Dec 2020 23:58:07 +0000 (18:58 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 Dec 2020 23:58:21 +0000 (18:58 -0500)
commit0ec5f7e78231a621a1d96c4bfedc4a1849a6c6cc
treeb405c93112e30c7cdeeb5d0fa6bc4e318fd2056e
parent8c15a297452e970d68529ee2ce6bd94d84598409
Allow subscripting of hstore values.

This is basically a finger exercise to prove that it's possible for
an extension module to add subscripting ability.  Subscripted fetch
from an hstore is not different from the existing "hstore -> text"
operator.  Subscripted update does seem to be a little easier to
use than the traditional update method using hstore concatenation,
but it's not a fundamentally new ability.

However, there may be some value in the code as sample code, since
it shows what's basically the minimum-complexity way to implement
subscripting when one needn't consider nested container objects.

Discussion: https://postgr.es/m/3724341.1607551174@sss.pgh.pa.us
contrib/hstore/Makefile
contrib/hstore/expected/hstore.out
contrib/hstore/hstore--1.7--1.8.sql [new file with mode: 0644]
contrib/hstore/hstore.control
contrib/hstore/hstore_subs.c [new file with mode: 0644]
contrib/hstore/sql/hstore.sql
doc/src/sgml/hstore.sgml
doc/src/sgml/ref/create_type.sgml