@@ -3220,7 +3220,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3220
3220
</para>
3221
3221
<para>
3222
3222
Splits <parameter>string</parameter> using a POSIX regular
3223
- expression as the delimiter; see
3223
+ expression as the delimiter, producing an array of results ; see
3224
3224
<xref linkend="functions-posix-regexp"/>.
3225
3225
</para>
3226
3226
<para>
@@ -3239,7 +3239,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3239
3239
</para>
3240
3240
<para>
3241
3241
Splits <parameter>string</parameter> using a POSIX regular
3242
- expression as the delimiter; see
3242
+ expression as the delimiter, producing a set of results ; see
3243
3243
<xref linkend="functions-posix-regexp"/>.
3244
3244
</para>
3245
3245
<para>
@@ -3460,6 +3460,65 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3460
3460
</para></entry>
3461
3461
</row>
3462
3462
3463
+ <row>
3464
+ <entry role="func_table_entry"><para role="func_signature">
3465
+ <indexterm>
3466
+ <primary>string_to_array</primary>
3467
+ </indexterm>
3468
+ <function>string_to_array</function> ( <parameter>string</parameter> <type>text</type>, <parameter>delimiter</parameter> <type>text</type> <optional>, <parameter>null_string</parameter> <type>text</type> </optional> )
3469
+ <returnvalue>text[]</returnvalue>
3470
+ </para>
3471
+ <para>
3472
+ Splits the <parameter>string</parameter> at occurrences
3473
+ of <parameter>delimiter</parameter> and forms the resulting fields
3474
+ into a <type>text</type> array.
3475
+ If <parameter>delimiter</parameter> is <literal>NULL</literal>,
3476
+ each character in the <parameter>string</parameter> will become a
3477
+ separate element in the array.
3478
+ If <parameter>delimiter</parameter> is an empty string, then
3479
+ the <parameter>string</parameter> is treated as a single field.
3480
+ If <parameter>null_string</parameter> is supplied and is
3481
+ not <literal>NULL</literal>, fields matching that string are
3482
+ replaced by <literal>NULL</literal>.
3483
+ </para>
3484
+ <para>
3485
+ <literal>string_to_array('xx~~yy~~zz', '~~', 'yy')</literal>
3486
+ <returnvalue>{xx,NULL,zz}</returnvalue>
3487
+ </para></entry>
3488
+ </row>
3489
+
3490
+ <row>
3491
+ <entry role="func_table_entry"><para role="func_signature">
3492
+ <indexterm>
3493
+ <primary>string_to_table</primary>
3494
+ </indexterm>
3495
+ <function>string_to_table</function> ( <parameter>string</parameter> <type>text</type>, <parameter>delimiter</parameter> <type>text</type> <optional>, <parameter>null_string</parameter> <type>text</type> </optional> )
3496
+ <returnvalue>setof text</returnvalue>
3497
+ </para>
3498
+ <para>
3499
+ Splits the <parameter>string</parameter> at occurrences
3500
+ of <parameter>delimiter</parameter> and returns the resulting fields
3501
+ as a set of <type>text</type> rows.
3502
+ If <parameter>delimiter</parameter> is <literal>NULL</literal>,
3503
+ each character in the <parameter>string</parameter> will become a
3504
+ separate row of the result.
3505
+ If <parameter>delimiter</parameter> is an empty string, then
3506
+ the <parameter>string</parameter> is treated as a single field.
3507
+ If <parameter>null_string</parameter> is supplied and is
3508
+ not <literal>NULL</literal>, fields matching that string are
3509
+ replaced by <literal>NULL</literal>.
3510
+ </para>
3511
+ <para>
3512
+ <literal>string_to_table('xx~^~yy~^~zz', '~^~', 'yy')</literal>
3513
+ <returnvalue></returnvalue>
3514
+ <programlisting>
3515
+ xx
3516
+ NULL
3517
+ zz
3518
+ </programlisting>
3519
+ </para></entry>
3520
+ </row>
3521
+
3463
3522
<row>
3464
3523
<entry role="func_table_entry"><para role="func_signature">
3465
3524
<indexterm>
@@ -17819,33 +17878,6 @@ SELECT NULLIF(value, '(none)') ...
17819
17878
</para></entry>
17820
17879
</row>
17821
17880
17822
- <row>
17823
- <entry role="func_table_entry"><para role="func_signature">
17824
- <indexterm>
17825
- <primary>string_to_array</primary>
17826
- </indexterm>
17827
- <function>string_to_array</function> ( <parameter>string</parameter> <type>text</type>, <parameter>delimiter</parameter> <type>text</type> <optional>, <parameter>null_string</parameter> <type>text</type> </optional> )
17828
- <returnvalue>text[]</returnvalue>
17829
- </para>
17830
- <para>
17831
- Splits the <parameter>string</parameter> at occurrences
17832
- of <parameter>delimiter</parameter> and forms the remaining data
17833
- into a <type>text</type> array.
17834
- If <parameter>delimiter</parameter> is <literal>NULL</literal>,
17835
- each character in the <parameter>string</parameter> will become a
17836
- separate element in the array.
17837
- If <parameter>delimiter</parameter> is an empty string, then
17838
- the <parameter>string</parameter> is treated as a single field.
17839
- If <parameter>null_string</parameter> is supplied and is
17840
- not <literal>NULL</literal>, fields matching that string are converted
17841
- to <literal>NULL</literal> entries.
17842
- </para>
17843
- <para>
17844
- <literal>string_to_array('xx~~yy~~zz', '~~', 'yy')</literal>
17845
- <returnvalue>{xx,NULL,zz}</returnvalue>
17846
- </para></entry>
17847
- </row>
17848
-
17849
17881
<row>
17850
17882
<entry role="func_table_entry"><para role="func_signature">
17851
17883
<indexterm>
0 commit comments