Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 821879F9ACF for ; Wed, 19 Sep 2007 14:44:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 05837-05 for ; Wed, 19 Sep 2007 14:44:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id 390C89F9A3E for ; Wed, 19 Sep 2007 14:44:04 -0300 (ADT) Received: from localhost.enta.net ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1IY3ag-0001EY-2b; Wed, 19 Sep 2007 18:43:58 +0100 To: "Decibel!" Cc: "Stefan Arentz" , Subject: Re: Speeding up schema changes In-Reply-To: (Decibel!'s message of "Wed\, 19 Sep 2007 10\:04\:50 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 38621) References: <874pic0way.fsf@oxford.xeocode.com> From: Gregory Stark Organization: EnterpriseDB Date: Wed, 19 Sep 2007 18:43:57 +0100 Message-ID: <87bqbyim8y.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/136 X-Sequence-Number: 29349 "Decibel!" writes: > On Sep 3, 2007, at 7:26 AM, Gregory Stark wrote: >> Also, incidentally do you have a good reason to use CHAR instead of varchar >> or >> text? char(64) will take 64 bytes (actually 68 bytes in 8.2) even if you >> don't >> store anything more in it. text or varchar will take only as many bytes as >> the >> data you're storing (plus 4 bytes). > > Hrm, do we actually pad before storing? ISTM we should really do that the > other way around... Yes we do. And it isn't really fixable either. The problem is the familiar old problem that in Postgres the typmod is not really part of the type and not always available when we need it to interpret the datum. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com