Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8C1C7475EE2 for ; Fri, 8 Nov 2002 14:13:04 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id B877C475EB9 for ; Fri, 8 Nov 2002 14:13:03 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id gA8JFj6P000690; Fri, 8 Nov 2002 14:15:45 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id gA8JCvj01811; Fri, 8 Nov 2002 14:13:01 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id WK2G0J5W; Fri, 8 Nov 2002 14:12:56 -0500 Subject: Re: changing numeric into int From: Robert Treat To: Huub Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 08 Nov 2002 14:12:57 -0500 Message-Id: <1036782777.12692.12.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/144 X-Sequence-Number: 10286 There is no way to do this short of maybe hacking at the system tables, and even then thats likely to cause problems. If you cant recreate the table, your best bet is to create two new columns and copy the data in, delete the data from the old columns, rename the columns accordingly, and perhaps add a rule to always set the old columns to NULL. Robert Treat On Fri, 2002-11-08 at 02:41, Huub wrote: > Hi, > > I want to change 2 columns in the same table from numeric into int. Can > I do this without deleting the old table and creating a new one? Data > stays the same.. > > Thanks > > Huub > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html