From e29c16dc50a3d486df27a46743b7e8073d39efad Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 7 Aug 2001 22:41:49 +0000 Subject: [PATCH] some clarifications inspired by the DocNotes --- doc/src/sgml/datatype.sgml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 3ca2d7f296..21fa569a01 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,5 +1,5 @@ @@ -552,28 +552,24 @@ CREATE TABLE tablename ( Character Types - + - Type Name - Storage + Type name Description - character(n), char(n) - (4+n) bytes + character(n), char(n) Fixed-length blank padded - character varying(n), varchar(n) - (4+n) bytes + character varying(n), varchar(n) Variable-length with limit text - (4+n) bytes Variable unlimited length @@ -624,9 +620,15 @@ CREATE TABLE tablename ( - Refer to for information about - the syntax of string literals, and to - for information about available operators and functions. + The storage requirement for data of these types is 4 bytes plus + the actual string, and in case of character plus the + padding. Long strings will actually be compressed by the system + automatically. In any case, the longest possible character string + that can be stored is about 1 GB. (The maximum value that will be + allowed for n in the data type declaration is + actually larger than that. It wouldn't be very useful to change + this because with multi-byte character encodings the number of + characters and bytes can be quite different anyway.) @@ -637,6 +639,12 @@ CREATE TABLE tablename ( + + Refer to for information about + the syntax of string literals, and to + for information about available operators and functions. + + Using the character types -- 2.40.0