pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add string_to_table() function.
Date: Wed, 02 Sep 2020 22:24:07 +0000
Message-ID: <E1kDbAl-0002Oh-Oq@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/66f163068030b5c5fe792a0daee27822dac43791

Modified Files
--------------
doc/src/sgml/func.sgml               |  90 ++++++++++-----
src/backend/utils/adt/varlena.c      | 214 +++++++++++++++++++++++++----------
src/include/catalog/catversion.h     |   2 +-
src/include/catalog/pg_proc.dat      |  18 ++-
src/test/regress/expected/arrays.out | 108 ++++++++++++++++++
src/test/regress/sql/arrays.sql      |  15 +++
6 files changed, 354 insertions(+), 93 deletions(-)



Message-ID: <E1kDbAl-0002Oh-Oq@gemulon.postgresql.org>
Permalink:  ../E1kDbAl-0002Oh-Oq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kDbAl-0002Oh-Oq@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Add string_to_table() function.
  In-Reply-To: <E1kDbAl-0002Oh-Oq@gemulon.postgresql.org>
  References: <E1kDbAl-0002Oh-Oq@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox