Re: altering a table to set serial function

From: "Scott Marlowe" <smarlowe(at)qwest(dot)net>
To: "Prabu Subroto" <prabu_subroto(at)yahoo(dot)com>
Cc: "Postgres General Milis" <pgsql-general(at)postgresql(dot)org>
Subject: Re: altering a table to set serial function
Date: 2004-07-28 16:08:32
Message-ID: 1091030912.6263.17.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-07-28 16:37:26 Re: tablename type?
Previous Message =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= 2004-07-28 15:34:25 Re: tablename type?