Received: from megazone.bigpanda.com ([63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB72f5m22400 for ; Thu, 6 Dec 2001 21:41:05 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3C076D5F1; Thu, 6 Dec 2001 18:41:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 31B935BED; Thu, 6 Dec 2001 18:41:09 -0800 (PST) Date: Thu, 6 Dec 2001 18:41:09 -0800 (PST) From: Stephan Szabo To: Christopher Kings-Lynne Cc: Hackers Subject: Re: [SQL] how to change the type In-Reply-To: Message-ID: <20011206183802.E30420-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/192 X-Sequence-Number: 16339 On Fri, 7 Dec 2001, Christopher Kings-Lynne wrote: > OK, I'm kind of interested now in how the variable length attributes are > actually stored on disk, that you are able to increase them, but not > decrease? > > I would have thought the other way around? IIRC, the values are stored as length + data. I think char() might do wierd things (I don't know if the trailing spaces are stored), but varchar() and text should be expandable because anything that could have fit before should still fit and look the same. Going down is problematic, because if you have a varchar(5) field where one value is say 'abcd' and you make it varchar(3) what happens?