Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB7Lfjm07371 for ; Fri, 7 Dec 2001 16:41:48 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 4891CD5EF; Fri, 7 Dec 2001 13:41:46 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 3C3F05BED; Fri, 7 Dec 2001 13:41:46 -0800 (PST) Date: Fri, 7 Dec 2001 13:41:46 -0800 (PST) From: Stephan Szabo To: Tom Lane Cc: Christopher Kings-Lynne , Hackers Subject: Re: [SQL] how to change the type In-Reply-To: <29705.1007739373@sss.pgh.pa.us> Message-ID: <20011207132327.H38113-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/224 X-Sequence-Number: 16371 On Fri, 7 Dec 2001, Tom Lane wrote: > Stephan Szabo writes: > > 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? > > What would actually happen right now is nothing: the value would still > be 'abcd' and would still read out that way. The 3-char limit would > only get enforced during inserts and updates of the column. That's what I figured, but I also assume that'd be "wrong" in a pure sense since the value is invalid for the new datatype, so I figure its safer to say up only. :)