proposal - function string_to_table

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: proposal - function string_to_table
Date: 2020-04-17 17:47:15
Message-ID: CAFj8pRD8HOpjq2TqeTBhSo_QkzjLOhXzGCpKJ4nCs7Y9SQkuPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I propose new function string_to_table. This function is significantly
faster (and simpler) variant of regexp_split_to_array function. There was
same process years ago when we implemented string_agg as faster variant of
array_to_string(array_agg()). string_to_table is faster variant (and little
bit more intuitive alternative of unnest(string_to_array()).

string_to_table is about 15% faster than unnest(string_to_array()) and
about 40% faster than regexp_split_to_array.

Initial patch is attached

Notes, comments?

Regards

Pavel

Attachment Content-Type Size
string_to_table.patch text/x-patch 12.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jürgen Purtz 2020-04-17 17:56:08 Additional Chapter for Tutorial
Previous Message Tom Lane 2020-04-17 17:46:37 Re: It is not documented that pg_promote can exit standby mode