Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ef5baf

Browse files
committed
Document that && can be used to search arrays.
Also, add some cross-links to the indexing documentation, so it's easierto notice that && and other array operators have index support.Ryan Kelly, edited by me.
1 parent6753ced commit6ef5baf

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

‎doc/src/sgml/array.sgml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,20 @@ SELECT * FROM
573573
This function is described in <xref linkend="functions-srf-subscripts">.
574574
</para>
575575

576+
<para>
577+
You can also search an array using the <literal>&amp;&amp;</> operator,
578+
which checks whether the left operand overlaps with the right operand.
579+
For instance:
580+
581+
<programlisting>
582+
SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000];
583+
</programlisting>
584+
585+
This and other array operators are further described in
586+
<xref linkend="functions-array">. It can be accelerated by an appropriate
587+
index, as described in <xref linkend="indexes-types">.
588+
</para>
589+
576590
<tip>
577591
<para>
578592
Arrays are not sets; searching for specific array elements

‎doc/src/sgml/func.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10282,7 +10282,8 @@ SELECT NULLIF(value, '(none)') ...
1028210282

1028310283
<para>
1028410284
See <xref linkend="arrays"> for more details about array operator
10285-
behavior.
10285+
behavior. See <xref linkend="indexes-types"> for more details about
10286+
which operators support indexed operations.
1028610287
</para>
1028710288

1028810289
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp