Commit 463b808e authored by Tom Lane's avatar Tom Lane

Doc: correct nitpicky mistakes in array_position/array_positions examples.

Daniel Gustafsson and Erik Rijkers, per report from nick@cleaton

Discussion: https://postgr.es/m/159275646273.679.16940709892308114570@wrigleys.postgresql.org
parent a82ba066
...@@ -669,14 +669,16 @@ SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000]; ...@@ -669,14 +669,16 @@ SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000];
<programlisting> <programlisting>
SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'mon'); SELECT array_position(ARRAY['sun','mon','tue','wed','thu','fri','sat'], 'mon');
array_positions array_position
----------------- ----------------
2 2
(1 row)
SELECT array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1); SELECT array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1);
array_positions array_positions
----------------- -----------------
{1,4,8} {1,4,8}
(1 row)
</programlisting> </programlisting>
</para> </para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment