0

Is there any difference between varchar and varchar(n) regarding any performance and disk usage in postgresql? (Except length constraint and constraint performance). For example, does varchar(wihtout n) consume more space?

1 Answers1

0

varchar, varchar(n) and text are all the same under the hood; the only exception is the lenght check in varchar(n), which acts like a (fast) check constraint.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263