From: Bruce Momjian Date: Wed, 15 Jan 2003 18:01:05 +0000 (+0000) Subject: Reorder VARCHAR() to appear before CHAR() in docs. X-Git-Tag: REL9_0_0~15917 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0eed62f34d95d5c7ae7e0931cfe632f4c8373ec0;p=pg-rex%2Fsyncrep.git Reorder VARCHAR() to appear before CHAR() in docs. --- diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index a837b31550..3d75edca76 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,5 +1,5 @@ @@ -87,18 +87,18 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.110 2002/12/06 05:17:42 m - 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 IP network address @@ -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 SQL: bit, bit varying, boolean, char, - character, character varying, + character varying, character, varchar, date, double precision, integer, interval, numeric, decimal, real, @@ -812,14 +812,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 . 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. diff --git a/doc/src/sgml/sql.sgml b/doc/src/sgml/sql.sgml index 591e9aed3e..423f5155d2 100644 --- a/doc/src/sgml/sql.sgml +++ b/doc/src/sgml/sql.sgml @@ -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. +