Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ldng
· 7y ago · 0 comments
PostgreSQL do have a variable unlimited length datatype : text. AFAIK, Varchar is internally a subtype that bound the text type. So in extreme situations you might even get a very slight performance advantage using text instead of varchar.
Comments
[–]
pkrefta
7y ago
This is exactly how it is. You can find confirmation in Postgres docs [1]
[1]
https://www.postgresql.org/docs/9.1/datatype-character.html
[–]
benatkin
7y ago
Interesting. When is there an advantage of using varchar in postgres, other than limiting the field length?
[–]
nicoburns
7y ago
I think never, except if you want your SQL to be portable to other dbs.