From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Nolan <nolan@gw.tssi.com>
Cc: josh@agliodbs.com
Cc: wmoran@potentialtech.com
Cc: threshar@torgo.978.org
Cc: pgsql-performance@postgresql.org
Subject: Re: Fixed width rows faster?
Date: Sat, 06 Mar 2004 00:42:19 -0500
Message-ID: <14231.1078551739@sss.pgh.pa.us> (raw)
In-Reply-To: <200403052343.i25NhYsv021796@gw.tssi.com>
References: <200403052343.i25NhYsv021796@gw.tssi.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, nolan@gw.tssi.com, josh@agliodbs.com, wmoran@potentialtech.com, threshar@torgo.978.org
Subject: Re: Fixed width rows faster?
In-Reply-To: <14231.1078551739@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox