Re: ALTERING A TABLE

From: Steve Wampler <swampler(at)noao(dot)edu>
To: postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ALTERING A TABLE
Date: 2000-06-01 18:00:09
Message-ID: 3936A4A9.A6518F70@noao.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler(at)noao(dot)edu

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message leonbloy 2000-06-01 18:08:31 btree index and max()
Previous Message Simon Hardingham 2000-06-01 17:32:47 query optimiser changes 6.5->7.0