Mike Nolan <nolan@gw.tssi.com> writes:
>> Frankly, the only reason to use anything other than TEXT is
>> compatibility with other databases and applications.
> You don't consider a requirement that a field be no longer than a
> certain length a reason not to use TEXT?
If you have an actual business-logic requirement to restrict a field to
no more than N characters, then by all means use varchar(N); that's
what it's for. But I agree with what I think Josh meant: there is very
seldom any non-broken reason to have a hard upper limit on string
lengths. If you think you need varchar(N) you should stop and ask
why exactly. If you cannot give a specific, coherent reason why the
particular value of N that you're using is the One True Length for the
field, then you really need to think twice.
regards, tom lane