Re: altering a table to set serial function - Mailing list pgsql-general

From Scott Marlowe
Subject Re: altering a table to set serial function
Date
Msg-id 1091030912.6263.17.camel@localhost.localdomain
Whole thread Raw
In response to Re: altering a table to set serial function  (Prabu Subroto <prabu_subroto@yahoo.com>)
List pgsql-general
On Wed, 2004-07-28 at 06:09, Prabu Subroto wrote:
> Dear Scott...
>
> My God.... so I can not use "alter table" to define a
> column with int data type?

Not define, REdefine.  Right now, the version going into beta will let
you redefine columns from one type to another.  Til then, you have to
make a new column, and move your data into it.:

alter table test add column newid;
update test set newid=cast (id as int4);

Then the rest of what I posted.




pgsql-general by date:

Previous
From: Harald Fuchs
Date:
Subject: Re: Sql injection attacks
Next
From: Chris Browne
Date:
Subject: Re: NNTP server