4 ms·
Another advantage of using `varchar(n)` rather than a constraint is that the limit is visible in `information_schema.columns` and `pg_attribute`, so tools using
by mjw1007 5y ago
Another advantage of using `varchar(n)` rather than a constraint is that the limit is visible in `information_schema.columns` and `pg_attribute`, so tools using this sort of introspection have a better chance of doing something useful.
(Incidentally, distinguishing between "text" and "varchar" the way you do in the article can be confusing, because in PostgreSQL plain `varchar` instead of `varchar(N)` is another way of getting an unconstrained character type.)