Re: changing numeric into int - Mailing list pgsql-sql

From Robert Treat
Subject Re: changing numeric into int
Date
Msg-id 1036782777.12692.12.camel@camel
Whole thread Raw
In response to changing numeric into int  (Huub <v.niekerk@freeler.nl>)
List pgsql-sql
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




pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Time difference without intervals
Next
From: Tom Lane
Date:
Subject: Re: Time difference without intervals