Caution, char != grapheme. Did you try it with combining characters?
I believe that Postgres, following the SQL standard, silently truncates longer strings when using varchar(n), which is probably not a desirable result if you're using it for validation.
Caution, char != grapheme. Did you try it with combining characters?
I believe that Postgres, following the SQL standard, silently truncates longer strings when using varchar(n), which is probably not a desirable result if you're using it for validation.