From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mike Nolan <nolan(at)gw(dot)tssi(dot)com> |
Cc: | josh(at)agliodbs(dot)com, wmoran(at)potentialtech(dot)com (Bill Moran), threshar(at)torgo(dot)978(dot)org (Jeff), pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Fixed width rows faster? |
Date: | 2004-03-06 05:42:19 |
Message-ID: | 14231.1078551739@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Mike Nolan <nolan(at)gw(dot)tssi(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-06 05:53:49 | Re: Fixed width rows faster? |
Previous Message | Mike Nolan | 2004-03-06 04:32:14 | Re: Fixed width rows faster? |