Reorder VARCHAR() to appear before CHAR() in docs.
authorBruce Momjian
Wed, 15 Jan 2003 18:01:05 +0000 (18:01 +0000)
committerBruce Momjian
Wed, 15 Jan 2003 18:01:05 +0000 (18:01 +0000)
doc/src/sgml/datatype.sgml
doc/src/sgml/sql.sgml

index a837b31550a7f2fd3ce25c9601db38b5de8af093..3d75edca765400580e58bec1e8897d803e068ae6 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -86,18 +86,18 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.110 2002/12/06 05:17:42 m
        binary data
       
 
-      
-       character(n)
-       char(n)
-       fixed-length character string
-      
-
       
        character varying(n)
        varchar(n)
        variable-length character string
       
 
+      
+       character(n)
+       char(n)
+       fixed-length character string
+      
+
       
        cidr
        
@@ -248,7 +248,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.110 2002/12/06 05:17:42 m
     The following types (or spellings thereof) are specified by
     SQLbitbit
     varying, booleanchar,
-    charactercharacter varying,
+    character varyingcharacter,
     varchardatedouble
     precision, integerinterval,
     numericdecimalreal,
@@ -811,14 +811,14 @@ CREATE TABLE tablename (
        
       
       
-       
-   character(n)char(n)
-   fixed-length, blank padded
-       
        
    character varying(n)varchar(n)
    variable-length with limit
        
+       
+   character(n)char(n)
+   fixed-length, blank padded
+       
        
    text
    variable unlimited length
@@ -835,29 +835,29 @@ CREATE TABLE tablename (
 
    
     SQL defines two primary character types:
-    character(n) and character
-    varying(n), where n is a
-    positive integer.  Both of these types can store strings up to
+    character varying(n) and
+    character(n), where n
+    is a positive integer.  Both of these types can store strings up to
     n characters in length.  An attempt to store a
     longer string into a column of these types will result in an
     error, unless the excess characters are all spaces, in which case
-    the string will be truncated to the maximum length.  (This
-    somewhat bizarre exception is required by the
-    SQL standard.)  If the string to be stored is
-    shorter than the declared length, values of type
-    character will be space-padded; values of type
-    character varying will simply store the shorter
+    the string will be truncated to the maximum length. (This somewhat
+    bizarre exception is required by the SQL
+    standard.) If the string to be stored is shorter than the declared
+    length, values of type character will be space-padded;
+    values of type character varying will simply store the
+    shorter
     string.
    
 
    
     
-     If one explicitly casts a value to
-     character(n) or character
-     varying(n), then an overlength value will
-     be truncated to n characters without raising an
-     error.  (This too is required by the SQL
-     standard.)
+     If one explicitly casts a value to character
+     varying(n) or
+     character(n), then an over-length
+     value will be truncated to n characters without
+     raising an error. (This too is required by the
+     SQL standard.)
     
    
 
@@ -870,14 +870,14 @@ CREATE TABLE tablename (
    
 
    
-    The notations char(n) and
-    varchar(n) are aliases for
-    character(n) and character
-    varying(n),
-    respectively. character without length specifier is
-    equivalent to character(1); if character
-    varying is used without length specifier, the type accepts
-    strings of any size.  The latter is a PostgreSQL extension.
+    The notations varchar(n) and
+    char(n) are aliases for character
+    varying(n) and
+    character(n), respectively.
+    character without length specifier is equivalent to
+    character(1); if character varying is used
+    without length specifier, the type accepts strings of any size. The
+    latter is a PostgreSQL extension.
    
 
    
@@ -961,19 +961,18 @@ SELECT b, char_length(b) FROM test2;
 
    
     There are two other fixed-length character types in
-    PostgreSQL, shown in .
-    The name type
-    exists only for storage of internal catalog
-    names and is not intended for use by the general user.  Its length
-    is currently defined as 64 bytes (63 usable characters plus terminator)
-    but should be referenced using the constant
-    NAMEDATALEN.  The length is set at compile time
-    (and is therefore adjustable for special uses); the default
-    maximum length may change in a future release.  The type
-    "char" (note the quotes) is different from
-    char(1) in that it only uses one byte of storage.  It
-    is internally used in the system catalogs as a poor-man's
-    enumeration type.
+    PostgreSQL, shown in 
+    linkend="datatype-character-special-table">. The name
+    type exists only for storage of internal
+    catalog names and is not intended for use by the general user. Its
+    length is currently defined as 64 bytes (63 usable characters plus
+    terminator) but should be referenced using the constant
+    NAMEDATALEN. The length is set at compile time (and
+    is therefore adjustable for special uses); the default maximum
+    length may change in a future release. The type "char"
+    (note the quotes) is different from char(1) in that it
+    only uses one byte of storage. It is internally used in the system
+    catalogs as a poor-man's enumeration type.
    
 
     
index 591e9aed3e8a7a710037ea0a516ce48073399d1e..423f5155d2433207383e69cc4ea547a47faf41c5 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -1749,19 +1749,20 @@ CREATE TABLE SELLS
 
        
    
-    CHAR(n):
-    fixed length character string of length
+    VARCHAR(n):
+    varying length character string of maximum length
     n.
    
        
 
        
    
-    VARCHAR(n):
-    varying length character string of maximum length
+    CHAR(n):
+    fixed length character string of length
     n.
    
        
+