Re: Fixed width rows faster?
От | Tom Lane |
---|---|
Тема | Re: Fixed width rows faster? |
Дата | |
Msg-id | 14231.1078551739@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Fixed width rows faster? (Mike Nolan <nolan@gw.tssi.com>) |
Ответы |
Re: Fixed width rows faster?
|
Список | pgsql-performance |
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
В списке pgsql-performance по дате отправления: