X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B0C82D1D1F2 for ; Sat, 6 Mar 2004 05:42:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 89523-01 for ; Sat, 6 Mar 2004 01:42:27 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 57502D1D10B for ; Sat, 6 Mar 2004 01:42:22 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i265gJ72014232; Sat, 6 Mar 2004 00:42:19 -0500 (EST) To: Mike Nolan Cc: josh@agliodbs.com, wmoran@potentialtech.com (Bill Moran), threshar@torgo.978.org (Jeff), pgsql-performance@postgresql.org Subject: Re: Fixed width rows faster? In-reply-to: <200403052343.i25NhYsv021796@gw.tssi.com> References: <200403052343.i25NhYsv021796@gw.tssi.com> Comments: In-reply-to Mike Nolan message dated "Fri, 05 Mar 2004 17:43:33 -0600" Date: Sat, 06 Mar 2004 00:42:19 -0500 Message-ID: <14231.1078551739@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/69 X-Sequence-Number: 5925 Mike Nolan 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