The following table shows the various character types:
Name | Comments | Trailing spaces | Maximum length |
char | Equivalent to char(1), it must be quoted as shown in the name. | Semantically insignificant | 1 |
name | Equivalent to varchar(64). Used by postgres for object names. | Semantically significant | 64 |
char(n) | Alias: character(n) Fixed length character where the length is n. Internally called bpchar (blank padded character). | Semantically insignificant | 1 to 10485760 |
Varchar(n) | Alias: character varying(n). Variable length character where the maximum length is n. | Semantically significant | 1 to 10485760 |
Text | Variable length character. | Semantically significant | Unlimited |
PostgreSQL provides two general text types, which ...