VARCHAR vs TEXT #142
dawidmachon
started this conversation in
General
Replies: 1 comment
-
|
I don't think it matters a lot if it's TEXT or VARCHAR, but if we were to pick one, I guess go with the one more commonly used. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I saw on supabase docs you use VARCHAR for postgres tables.
On PostgreSQL manual
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. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.
I usually use text
References: http://www.postgresql.org/docs/current/static/datatype-character.html
What you think?
Beta Was this translation helpful? Give feedback.
All reactions