|
character(n), char(n), bpchar(n)
- fixed-length, blank padded
+ fixed-length, blank-padded
+
+ |
+ bpchar
+ variable unlimited length, blank-trimmed
|
text
The type name varchar is an alias for character
- varying, while char and bpchar are
- aliases for character.
- The varchar and char aliases are defined in
- the
SQL standard, but
bpchar is
-
a PostgreSQL extension.
+ varying, while bpchar (with length specifier) and
+ char are aliases for character. The
+ varchar and char aliases are defined in the
+
SQL standard;
bpchar is a
If specified, the length n must be greater
- than zero and cannot exceed 10485760.
- character without length specifier is equivalent to
- character(1). If character varying is used
- without length specifier, the type accepts strings of any size.
+ than zero and cannot exceed 10,485,760. If character
+ varying (or varchar) is used without
+ length specifier, the type accepts strings of any length. If
+ bpchar lacks a length specifier, it also accepts strings
+ of any length, but trailing spaces are semantically insignificant.
+ If character (or char) lacks a specifier,
+ it is equivalent to character(1).