From 6ef5baf8b1cb609218b2fafb378b3f190a6f90f9 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Fri, 22 Jun 2012 08:59:41 -0400 Subject: [PATCH] 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. --- doc/src/sgml/array.sgml | 14 ++++++++++++++ doc/src/sgml/func.sgml | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml index 3508ba3e3c8..8b36d4ab85f 100644 --- a/doc/src/sgml/array.sgml +++ b/doc/src/sgml/array.sgml @@ -573,6 +573,20 @@ SELECT * FROM This function is described in . + + You can also search an array using the && operator, + which checks whether the left operand overlaps with the right operand. + For instance: + + +SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000]; + + + This and other array operators are further described in + . It can be accelerated by an appropriate + index, as described in . + + Arrays are not sets; searching for specific array elements diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index cd374ac350b..595523e3eba 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10282,7 +10282,8 @@ SELECT NULLIF(value, '(none)') ... See for more details about array operator - behavior. + behavior. See for more details about + which operators support indexed operations.