Document IS DISTINCT FROM in a more obvious place, and add some more
authorTom Lane
Tue, 26 Oct 2004 22:16:12 +0000 (22:16 +0000)
committerTom Lane
Tue, 26 Oct 2004 22:16:12 +0000 (22:16 +0000)
index entries for IS-foo constructs.

doc/src/sgml/func.sgml
doc/src/sgml/syntax.sgml

index 7e1b488bae7f167a339eaf3320e3bf2bee010a51..fb55b1bff7277d15f9164f5e87b039e85fb94267 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -283,6 +283,18 @@ PostgreSQL documentation
    
 
    
+    
+     IS NULL
+    
+    
+     IS NOT NULL
+    
+    
+     ISNULL
+    
+    
+     NOTNULL
+    
     To check whether a value is or is not null, use the constructs
 
 expression IS NULL
@@ -305,6 +317,7 @@ PostgreSQL documentation
     behavior conforms to the SQL standard.
    
 
+  
    
     Some applications may expect that
     expression = NULL
@@ -318,8 +331,43 @@ PostgreSQL documentation
     the default behavior in PostgreSQL
     releases 6.5 through 7.1.
    
+  
+
+   
+    
+     IS DISTINCT FROM
+    
+    The ordinary comparison operators yield null (signifying unknown)
+    when either input is null.  Another way to do comparisons is with the
+    IS DISTINCT FROM construct:
+
+expression IS DISTINCT FROM expression
+
+    For non-null inputs this is the same as the <> operator.
+    However, when both inputs are null it will return false, and when just
+    one input is null it will return true.  Thus it effectively acts as though
+    null were a normal data value, rather than unknown.
+   
 
    
+    
+     IS TRUE
+    
+    
+     IS NOT TRUE
+    
+    
+     IS FALSE
+    
+    
+     IS NOT FALSE
+    
+    
+     IS UNKNOWN
+    
+    
+     IS NOT UNKNOWN
+    
     Boolean values can also be tested using the constructs
 
 expression IS TRUE
@@ -329,9 +377,13 @@ PostgreSQL documentation
 expression IS UNKNOWN
 expression IS NOT UNKNOWN
 
-    These are similar to IS NULL in that they will
-    always return true or false, never a null value, even when the operand is null.
+    These will always return true or false, never a null value, even when the
+    operand is null.
     A null input is treated as the logical value unknown.
+    Notice that IS UNKNOWN and IS NOT UNKNOWN are
+    effectively the same as IS NULL and
+    IS NOT NULL, respectively, except that the input
+    expression must be of Boolean type.
    
   
 
@@ -7344,7 +7396,7 @@ SELECT col1 FROM tab1
   
 
   
-   <literal>NOT IN<span class="marked"> </span></literal>
+   <literal>NOT IN</literal>
 
 
 expression NOT IN (subquery)
@@ -7538,9 +7590,9 @@ SELECT col1 FROM tab1
   
    Row-wise Comparison
 
-   
+    zone="functions-subquery">
     comparison
-    of rows
+    subquery result row
    
 
 
@@ -7594,6 +7646,23 @@ SELECT col1 FROM tab1
    SOME
   
 
+  
+   comparison
+   row-wise
+  
+
+  
+   IS DISTINCT FROM
+  
+
+  
+   IS NULL
+  
+
+  
+   IS NOT NULL
+  
+
   
    This section describes several specialized constructs for making
    multiple comparisons between groups of values.  These forms are
index 98deceb8957a56081561ce2882a84c57510bf711..99038b426926b7bdfc35e88978378283884af413 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -1421,6 +1421,10 @@ SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name)
     constructor
    
 
+   
+    ARRAY
+   
+
    
     An array constructor is an expression that builds an
     array value from values for its member elements.  A simple array
@@ -1521,13 +1525,17 @@ SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%');
     constructor
    
 
+   
+    ROW
+   
+
    
     A row constructor is an expression that builds a row value (also
     called a composite value) from values
     for its member fields.  A row constructor consists of the key word
-    ROW, a left parenthesis (, zero or more
+    ROW, a left parenthesis, zero or more
     expressions (separated by commas) for the row field values, and finally
-    a right parenthesis ).  For example,
+    a right parenthesis.  For example,
 
 SELECT ROW(1,2.5,'this is a test');