Re: BUG #5831: Splitting string into char array with string_to_array does not work - Mailing list pgsql-bugs

From Pavel Stehule
Subject Re: BUG #5831: Splitting string into char array with string_to_array does not work
Date
Msg-id AANLkTikFOLgsA4dn3FwUDEpV-2cGs91KGxZCrsw2xHEL@mail.gmail.com
Whole thread Raw
In response to BUG #5831: Splitting string into char array with string_to_array does not work  ("Splitting string into char array with string_to_array" <valgog@gmail.com>)
List pgsql-bugs
2011/1/11 Splitting string into char array with string_to_array
<valgog@gmail.com>:
>
> The following bug has been logged online:
>
> Bug reference: =C2=A0 =C2=A0 =C2=A05831
> Logged by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Splitting string into char a=
rray with string_to_array
> Email address: =C2=A0 =C2=A0 =C2=A0valgog@gmail.com
> PostgreSQL version: 9.0.1
> Operating system: =C2=A0 Ubuntu/Linaro 4.4.4-14ubuntu5
> Description: =C2=A0 =C2=A0 =C2=A0 =C2=A0Splitting string into char array =
with string_to_array
> does not work
> Details:
>
> Hi,
>
> I cannot really remember now for sure, but the splitting string into array
> using an empty string ('') worked for me on pre-9.0 versions to get array=
 of
> string chars. Now I have the following behavior:

Hello

it's newer worked like you remember

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

Regards

Pavel Stehule


>
> =C2=A0 =C2=A0postgres=3D# select string_to_array('ab', '' ),
> regexp_split_to_array('ab', '' );
> =C2=A0 =C2=A0 string_to_array =E2=94=82 regexp_split_to_array
>
> =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=
=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=
=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=
=80=C3=A2
> =EF=BF=BD=EF=BF=BD=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=
=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=
=94=80
> =C2=A0 =C2=A0 {ab} =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=82 {a,=
b}
> =C2=A0 =C2=A0(1 row)
>
> Why an empty string given as a separator to string_to_array is not splitt=
ing
> the string at all?
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: domain over enum problem
Next
From: Robert Haas
Date:
Subject: Re: BUG #5809: bigserial duplicate value