Hacker News new | ask | show | jobs
by simnim 2102 days ago
What's wrong with TEXT type for postgres, mysql, etc? In Postgres you don't need to declare a length for varchar either.
1 comments

Yeah, in fact, Postgres encourages the use of TEXT over VARCHAR. The documentation even states:

There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column.

https://www.postgresql.org/docs/current/datatype-character.h...