Add array_remove() and array_replace() functions.
Tom Lane <tgl@sss.pgh.pa.us>
Add array_remove() and array_replace() functions. These functions support removing or replacing array element value(s) matching a given search value. Although intended mainly to support a future array-foreign-key feature, they seem useful in their own right. Marco Nenciarini and Gabriele Bartolini, reviewed by Alex Hunsaker
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +29 −0 |
| src/backend/utils/adt/arrayfuncs.c | modified | +306 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +4 −0 |
| src/include/utils/array.h | modified | +2 −0 |
| src/test/regress/expected/arrays.out | modified | +62 −0 |
| src/test/regress/sql/arrays.sql | modified | +11 −0 |