Paul Dlug writes:

> I would say as good judge, if you know for certain it will not exceed a
> length, use varchar(). But if there is a doubt just use TEXT rather than
> setting varchar() to a high value.

SQL doesn't seem to allow for a character type of infinite length which is
why we have text, but it's not necessarily portable. I don't understand
why varchar without length is supposed to default to 1, infinity makes
more sense to me.

Maybe the reason is that standards in general have problems with the
concept that compliant implementations could ever have no limit in a
specific area (see also various POSIX nonsense). That begs the question
whether this was done intentionally by vendors so as to hide deficiencies
in their products.


-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden

Reply via email to