Re: proposal: support empty string as separator for string_to_array

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: support empty string as separator for string_to_array
Date: 2009-07-25 17:55:21
Message-ID: 162867790907251055y2532c305s2830362c55702a54@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/7/25 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 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.
>
> There already is a definition for what string_to_array does with an
> empty field separator, and that is not it.  So this change would possibly
> break existing applications.  It does not seem either intuitively
> correct or useful enough to justify that --- particularly seeing that
> there's already another way to get the effect.

I thing, so nobody use empty separator in string_to_array, because it
does nothing useful. Or do you know any case where empty separator
should be used? I am not. My argument for "some" non regexp based
function is fact, so this function should be very light and fast.
Faster than regexp.

Other way is one param string_to_array function. This function is not
defined yet, so we could to use it.

Regards
Pavel

>
>                        regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-25 18:01:26 Re: proposal: support empty string as separator for string_to_array
Previous Message Tom Lane 2009-07-25 17:50:19 Re: [COMMITTERS] pgsql: Reserve the shared memory region during backend startup on