diff options
| author | Robert Haas <rhaas@postgresql.org> | 2012-06-22 08:59:41 -0400 |
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2012-06-22 08:59:41 -0400 |
| commit | 6ef5baf8b1cb609218b2fafb378b3f190a6f90f9 (patch) | |
| tree | 086b083e1fdc3dc6db18c2dfa6fda103bdbd48ae /doc/src/sgml/array.sgml | |
| parent | 6753ced3104046340659db15626580bc49df617d (diff) | |
| download | postgresql-6ef5baf8b1cb609218b2fafb378b3f190a6f90f9.tar.gz | |
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.
Diffstat (limited to 'doc/src/sgml/array.sgml')
| -rw-r--r-- | doc/src/sgml/array.sgml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml index 3508ba3e3c..8b36d4ab85 100644 --- a/doc/src/sgml/array.sgml +++ b/doc/src/sgml/array.sgml @@ -573,6 +573,20 @@ SELECT * FROM This function is described in <xref linkend="functions-srf-subscripts">. </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> <para> Arrays are not sets; searching for specific array elements |
