Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 192ce19

Browse files
committed
Document BETWEEN.
1 parent e28c095 commit 192ce19

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

doc/src/sgml/func.sgml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.49 2001/01/21 22:02:01 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.50 2001/02/05 19:21:45 petere Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -185,6 +185,29 @@
185185
<literal>3</literal>).
186186
</para>
187187

188+
<para>
189+
In addition to the comparison operators, the special
190+
<token>BETWEEN</token> construct is available.
191+
<synopsis>
192+
<replaceable>a</replaceable> BETWEEN <replaceable>x</replaceable> AND <replaceable>y</replaceable>
193+
</synopsis>
194+
is equivalent to
195+
<synopsis>
196+
<replaceable>a</replaceable> &gt;= <replaceable>x</replaceable> AND <replaceable>a</replaceable> &lt;= <replaceable>y</replaceable>
197+
</synopsis>
198+
Similarly,
199+
<synopsis>
200+
<replaceable>a</replaceable> NOT BETWEEN <replaceable>x</replaceable> AND <replaceable>y</replaceable>
201+
</synopsis>
202+
is equivalent to
203+
<synopsis>
204+
<replaceable>a</replaceable> &lt; <replaceable>x</replaceable> OR <replaceable>a</replaceable> &gt; <replaceable>y</replaceable>
205+
</synopsis>
206+
There is no difference between the two respective forms apart from
207+
the <acronym>CPU</acronym> cycles required to rewrite the first one
208+
into the second one internally.
209+
</para>
210+
188211
<para>
189212
To check whether a value is or is not NULL, use the constructs
190213
<synopsis>

0 commit comments

Comments
 (0)