Received: from dilbert.nurseamerica.net (unknown [207.53.237.114]) by postgresql.org (Postfix) with ESMTP id 12D03474E49 for ; Wed, 10 Jul 2002 19:16:52 -0400 (EDT) Received: from nurseamerica.net (archimedes.myrdin.net [206.176.158.41]) by dilbert.nurseamerica.net (8.11.6/8.11.6) with ESMTP id g6ANGsj24147; Wed, 10 Jul 2002 18:16:54 -0500 Message-ID: <3D2CC064.7010108@nurseamerica.net> Date: Wed, 10 Jul 2002 18:16:52 -0500 From: Kevin Brannen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: alter table modify column? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200207/169 X-Sequence-Number: 4855 As we transition our database, I'm finding the need to change columns types. I'm also finding this to be a major PITA. I have a column that's a something like: create table stuff ( ... rate varchar(7), ... ); However that doesn't allow math-like functions (e.g. avg), so it's gotta be changed. I'd like to do something on the order of: alter table stuff modify rate DECIMAL(5,2); but that doesn't work. I've scoured the docs and can't seem to find anything other than: 1. create new table with changed columns, 2. copy data over, 3. remove old table, 4. rename new table to old table Please tell me there's an easier way! And of course how. :-) Also, I can't find a "alter table drop column NAME" to remove a column either. TIA, Kevin