Thread: Text Type

Text Type

From
"Paul Skinner"
Date:

Character Types

SQL defines two primary character types: character and character varying. Postgres supports these types, in addition to the more general text type, which unlike character varying does not require an explicit declared upper limit on the size of the field.

Table 3-4. Postgres Character Types

Character TypeStorageRecommendationDescription
character(n), char(n)(4+n) bytesSQL-compatibleFixed-length blank padded
character varying(n), varchar(n)(4+n) bytesSQL-compatibleVariable-length with limit
text(4+n) bytesMost flexibleVariable unlimited length
 
 
 
-----------------------
 
Text type is not unlimited but rather limited by tuple size of 8140 bytes.
 
Paul