Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 996BA4759E7 for ; Tue, 10 Sep 2002 15:51:57 -0400 (EDT) Received: from dilbert.nurseamerica.net (unknown [207.53.237.114]) by postgresql.org (Postfix) with ESMTP id 71867476023 for ; Tue, 10 Sep 2002 15:51:55 -0400 (EDT) Received: from alice.nurseamerica.local (airband-216-138-83-219.airband.net [216.138.83.219] (may be forged)) by dilbert.nurseamerica.net (8.11.6/8.11.6) with ESMTP id g8AJpug01842 for ; Tue, 10 Sep 2002 14:51:56 -0500 Received: from nurseamerica.net ([192.168.0.17]) by alice.nurseamerica.local with Microsoft SMTPSVC(5.0.2195.5329); Tue, 10 Sep 2002 14:51:55 -0500 Message-ID: <3D7E4D5A.3040008@nurseamerica.net> Date: Tue, 10 Sep 2002 14:51:54 -0500 From: Kevin Brannen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Atkins Cc: pgsql-sql@postgresql.org Subject: Re: Changing Column Type References: <1CAD483B723BD611B0C10090274FF06855482A@NXCDMAIL> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Sep 2002 19:51:55.0533 (UTC) FILETIME=[8411D3D0:01C25903] X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/76 X-Sequence-Number: 9353 Peter Atkins wrote: > All, > > Is there a way to easily change the type of column? Or do I have to drop > and create again. > > From: > assignment_notes | character varying(255) > > To: > assignment_notes | text Do that kind of change will require creating a new table, copying the data, dropping the old table, renaming the new to the old. If you were changing from varchar(20) to varchar(255), you could hack the system tables and be OK (or so I've read). Going smaller is possible too, as long as your 110% sure you don't have any data bigger then the new smaller size (or you're taking your life into your own hands so to speak. :-) HTH, Kevin