Add string_to_table() function.
Tom Lane <tgl@sss.pgh.pa.us>
Add string_to_table() function. This splits a string at occurrences of a delimiter. It is exactly like string_to_array() except for producing a set of values instead of an array of values. Thus, the relationship of these two functions is the same as between regexp_split_to_table() and regexp_split_to_array(). Although the same results could be had from unnest(string_to_array()), this is somewhat faster than that, and anyway it seems reasonable to have it for symmetry with the regexp functions. Pavel Stehule, reviewed by Peter Smith Discussion: https://postgr.es/m/CAFj8pRD8HOpjq2TqeTBhSo_QkzjLOhXzGCpKJ4nCs7Y9SQkuPw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +61 −29 |
| src/backend/utils/adt/varlena.c | modified | +156 −58 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +13 −5 |
| src/test/regress/expected/arrays.out | modified | +108 −0 |
| src/test/regress/sql/arrays.sql | modified | +15 −0 |
Documentation touched
Discussion
- proposal - function string_to_table 22 messages · 2020-04-17 → 2020-09-03