summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut2001-02-05 19:21:45 +0000
committerPeter Eisentraut2001-02-05 19:21:45 +0000
commit192ce19d361b1a6ee5a6d7198ddb38780ec0cab8 (patch)
treee00c16f326b378dbc99b4b231d36f9001c0045ca /doc/src
parente28c095e8d44d9f77903eca22d9c88e9be72f5ef (diff)
Document BETWEEN.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml25
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index cf4ac7f7ac7..5e10ded5242 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.49 2001/01/21 22:02:01 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.50 2001/02/05 19:21:45 petere Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@@ -186,6 +186,29 @@
</para>
<para>
+ In addition to the comparison operators, the special
+ <token>BETWEEN</token> construct is available.
+<synopsis>
+<replaceable>a</replaceable> BETWEEN <replaceable>x</replaceable> AND <replaceable>y</replaceable>
+</synopsis>
+ is equivalent to
+<synopsis>
+<replaceable>a</replaceable> &gt;= <replaceable>x</replaceable> AND <replaceable>a</replaceable> &lt;= <replaceable>y</replaceable>
+</synopsis>
+ Similarly,
+<synopsis>
+<replaceable>a</replaceable> NOT BETWEEN <replaceable>x</replaceable> AND <replaceable>y</replaceable>
+</synopsis>
+ is equivalent to
+<synopsis>
+<replaceable>a</replaceable> &lt; <replaceable>x</replaceable> OR <replaceable>a</replaceable> &gt; <replaceable>y</replaceable>
+</synopsis>
+ There is no difference between the two respective forms apart from
+ the <acronym>CPU</acronym> cycles required to rewrite the first one
+ into the second one internally.
+ </para>
+
+ <para>
To check whether a value is or is not NULL, use the constructs
<synopsis>
<replaceable>expression</replaceable> IS NULL