Re: ALTERING A TABLE

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Steve Wampler <swampler(at)noao(dot)edu>
Cc: postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ALTERING A TABLE
Date: 2000-06-01 18:50:13
Message-ID: 3936B065.DF42F637@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Wampler wrote:
>
> Ron Peterson wrote:
> >
> >
> > You can't use ALTER TABLE to change a field's data description. You'll
> > have to make a new table. Then use SELECT INTO to move your data. Then
> > DROP TABLE oldtable. Then ALTER TABLE tablename RENAME TO newname.
>
> Would this really work? According to the docs, SELECT INTO creates a
> new table (which must not yet exist). So this new table
> would have the same field data descriptions as the original, right?
>
> Is the documentation wrong?

You are correct. I use INSERT INTO <tablename> SELECT ...

Hope that helps,

Mike Mascari

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henry 2000-06-01 18:52:37 client/server? odbc?
Previous Message Ed Loehr 2000-06-01 18:49:02 Re: ALTERING A TABLE