Text
Use text unless you need length validation
textvariableRecommended
General-purpose string storage. No length limit, no padding.
Range
unlimited
Performance
Same speed as varchar. No penalty for using text over varchar.
Comparison
text vs varchar: identical performance. varchar(n) only adds a length check — use it when your domain requires a max length (e.g. country codes). Prefer text for everything else.
SQL Example
CREATE TABLE posts ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, body text NOT NULL );