proposal: support empty string as separator for string_to_array

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: proposal: support empty string as separator for string_to_array
Date: 2009-07-25 03:40:13
Message-ID: 162867790907242040r6d8e1756s40f65cdc491f135e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I have one idea, that should simplify string to char array
transformation. The base is idea: between every char is empty string,
so empty string is regular separator for string_to_array function.
This behave is inversion of array_to_string function behave:

postgres=# select array_to_string(array['a','b','c'],'');
array_to_string
-----------------
abc
(1 row)

postgres=# select string_to_array('abc','');
string_to_array
-----------------
{a,b,c}
(1 row)

Notes, ideas???

Regards
Pavel Stehule

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2009-07-25 06:08:50 Re: WIP: to_char, support for EEEE format
Previous Message James Pye 2009-07-25 03:31:15 Re: WIP: plpython3