Allow subscripting of hstore values.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore/expected/hstore.out | modified | +23 −0 |
| contrib/hstore/hstore--1.7--1.8.sql | added | +13 −0 |
| contrib/hstore/hstore.control | modified | +1 −1 |
| contrib/hstore/hstore_subs.c | added | +297 −0 |
| contrib/hstore/Makefile | modified | +3 −1 |
| contrib/hstore/sql/hstore.sql | modified | +8 −0 |
| doc/src/sgml/hstore.sgml | modified | +42 −0 |
| doc/src/sgml/ref/create_type.sgml | modified | +5 −3 |
Documentation touched
Discussion
- [PATCH] Generic type subscripting 276 messages · 2017-02-28 → 2021-02-01