Re: changing numeric into int

From: Robert Treat <rtreat(at)webmd(dot)net>
To: Huub <v(dot)niekerk(at)freeler(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: changing numeric into int
Date: 2002-11-08 19:12:57
Message-ID: 1036782777.12692.12.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-11-08 21:11:05 Re: Time difference without intervals
Previous Message Bruno Wolff III 2002-11-08 18:59:10 Re: Time difference without intervals