Character Types
- 3">
+ 2">
|
- 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
- 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.)
+ Refer to for information about
+ the syntax of string literals, and to
+ for information about available operators and functions.
+
+
Using the character types