@@ -11479,6 +11479,12 @@ SELECT NULLIF(value, '(none)') ...
1147911479 <indexterm>
1148011480 <primary>array_lower</primary>
1148111481 </indexterm>
11482+ <indexterm>
11483+ <primary>array_offset</primary>
11484+ </indexterm>
11485+ <indexterm>
11486+ <primary>array_offsets</primary>
11487+ </indexterm>
1148211488 <indexterm>
1148311489 <primary>array_prepend</primary>
1148411490 </indexterm>
@@ -11596,6 +11602,32 @@ SELECT NULLIF(value, '(none)') ...
1159611602 <entry><literal>array_lower('[0:2]={1,2,3}'::int[], 1)</literal></entry>
1159711603 <entry><literal>0</literal></entry>
1159811604 </row>
11605+ <row>
11606+ <entry>
11607+ <literal>
11608+ <function>array_offset</function>(<type>anyarray</type>, <type>anyelement</type> <optional>, <type>int</type></optional>)
11609+ </literal>
11610+ </entry>
11611+ <entry><type>int</type></entry>
11612+ <entry>returns the offset of the first occurrence of the second
11613+ argument in the array, starting at the element indicated by the third
11614+ argument or at the first element (array must be one-dimensional)</entry>
11615+ <entry><literal>array_offset(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'mon')</literal></entry>
11616+ <entry><literal>2</literal></entry>
11617+ </row>
11618+ <row>
11619+ <entry>
11620+ <literal>
11621+ <function>array_offsets</function>(<type>anyarray</type>, <type>anyelement</type>)
11622+ </literal>
11623+ </entry>
11624+ <entry><type>int[]</type></entry>
11625+ <entry>returns an array of offsets of all occurrences of the second
11626+ argument in the array given as first argument (array must be
11627+ one-dimensional)</entry>
11628+ <entry><literal>array_offsets(ARRAY['A','A','B','A'], 'A')</literal></entry>
11629+ <entry><literal>{1,2,4}</literal></entry>
11630+ </row>
1159911631 <row>
1160011632 <entry>
1160111633 <literal>
@@ -11707,6 +11739,23 @@ NULL baz</literallayout>(3 rows)</entry>
1170711739 </tgroup>
1170811740 </table>
1170911741
11742+ <para>
11743+ In <function>array_offset</function> and <function>array_offsets</>,
11744+ each array element is compared to the searched value using
11745+ <literal>IS NOT DISTINCT FROM</literal> semantics.
11746+ </para>
11747+
11748+ <para>
11749+ In <function>array_offset</function>, <literal>NULL</literal> is returned
11750+ if the value is not found.
11751+ </para>
11752+
11753+ <para>
11754+ In <function>array_offsets</function>, <literal>NULL</literal> is returned
11755+ only if the array is <literal>NULL</literal>; if the value is not found in
11756+ the array, an empty array is returned instead.
11757+ </para>
11758+
1171011759 <para>
1171111760 In <function>string_to_array</function>, if the delimiter parameter is
1171211761 NULL, each character in the input string will become a separate element in
0 commit comments