Databases · Junior · Question 41 of 75
What is the difference between varchar(255) and text in PostgreSQL?
- ✓Correct answer: Performance is the same;
varchar(n)only adds a length limit - 2
textis much slower - 3
varcharstores only ASCII characters
Explanation
In PostgreSQL both are stored the same way. Use a CHECK constraint or varchar(n) when a limit is a real business rule.