mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Document that && can be used to search arrays.
Also, add some cross-links to the indexing documentation, so it's easier to notice that && and other array operators have index support. Ryan Kelly, edited by me.
This commit is contained in:
parent
6753ced310
commit
6ef5baf8b1
@ -573,6 +573,20 @@ SELECT * FROM
|
|||||||
This function is described in <xref linkend="functions-srf-subscripts">.
|
This function is described in <xref linkend="functions-srf-subscripts">.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can also search an array using the <literal>&&</> operator,
|
||||||
|
which checks whether the left operand overlaps with the right operand.
|
||||||
|
For instance:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000];
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
This and other array operators are further described in
|
||||||
|
<xref linkend="functions-array">. It can be accelerated by an appropriate
|
||||||
|
index, as described in <xref linkend="indexes-types">.
|
||||||
|
</para>
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
<para>
|
<para>
|
||||||
Arrays are not sets; searching for specific array elements
|
Arrays are not sets; searching for specific array elements
|
||||||
|
@ -10282,7 +10282,8 @@ SELECT NULLIF(value, '(none)') ...
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
See <xref linkend="arrays"> for more details about array operator
|
See <xref linkend="arrays"> for more details about array operator
|
||||||
behavior.
|
behavior. See <xref linkend="indexes-types"> for more details about
|
||||||
|
which operators support indexed operations.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user