From 61737a7b47cc692e03ba453a912007f644d6c8ec Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 26 Jan 2001 22:04:22 +0000 Subject: [PATCH] Add some links from data type chapter to section on literal constants. --- doc/src/sgml/datatype.sgml | 67 +++++++++++++++++++++++++++++----------------- doc/src/sgml/syntax.sgml | 4 +-- 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index c0f77a2ab4..183cd11e19 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,5 +1,5 @@ @@ -335,8 +335,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.47 2001/01/13 18:34:51 pe - The numeric types have a full set of corresponding arithmetic operators and - functions. Refer to for more information. + The syntax of constants for the numeric types is described in + . The numeric types have a + full set of corresponding arithmetic operators and + functions. Refer to for more + information. @@ -362,7 +365,7 @@ CREATE TABLE tablename ( CREATE SEQUENCE tablename_colname_seq; CREATE TABLE tablename - (colname INT4 DEFAULT nextval('tablename_colname_seq'); + (colname integer DEFAULT nextval('tablename_colname_seq'); CREATE UNIQUE INDEX tablename_colname_key on tablename (colname); @@ -394,20 +397,29 @@ CREATE TABLE tablename (Monetary Type - Obsolete Type + Deprecated - The money is now deprecated. Use numeric - or decimal instead. The money type may become a - locale-aware layer over the numeric type in a future release. + The money is now deprecated. Use + numeric or decimal instead, in + combination with the to_char function. The + money type may become a locale-aware layer over the + numeric type in a future release. - The money type supports US-style currency with - fixed decimal point representation. - If Postgres is compiled with USE_LOCALE - then the money type should use the monetary conventions defined for - locale(7). + The money type stores U.S.-style currency with fixed + decimal point representation. If + Postgres is compiled with locale + support then the money type uses locale-specific + output formatting. + + + + Input is accepted in a variety of formats, including integer and + floating point literals, as well as typical + currency formatting, such as '$1,000.00'. + Output is in the latter form. @@ -434,14 +446,9 @@ CREATE TABLE tablename ( - - - numeric - will replace the money type, and should be preferred. - - + Character Types @@ -456,6 +463,12 @@ CREATE TABLE tablename ( + Refer to for information about + the syntax of string literals, and to + for information about available operators and functions. + + + <productname>Postgres</productname> Character TypesCharacters @@ -661,8 +674,14 @@ CREATE TABLE tablename ( - Remember that any date or time input needs to be enclosed into single quotes, - like text strings. + Remember that any date or time input needs to be enclosed into + single quotes, like text strings. Refer to for more information. + SQL requires the following syntax + +type 'value' + + but Postgres is more flexible. @@ -1393,20 +1412,20 @@ January 8 04:05:06 1999 PST State - Output Input + Output True - 't' TRUE, 't', 'true', 'y', 'yes', '1' + t False - 'f' FALSE, 'f', 'false', 'n', 'no', '0' + f diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index 843f2d08f5..dd7702cbf0 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1,5 +1,5 @@ @@ -304,7 +304,7 @@ REAL '1.23' -- string style - + Constants of Other Types -- 2.11.0