Re: [GENERAL] Is it possible to change a columns name

From: "Pavel PaJaSoft Janousek" <janousek(at)fonet(dot)cz>
To: "Kevin Heflin" <kheflin(at)shreve(dot)net>
Cc: "Bruce Momjian" <maillist(at)candle(dot)pha(dot)pa(dot)us>, "Wim Ceulemans" <wim(dot)ceulemans(at)nice(dot)be>, <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Is it possible to change a columns name
Date: 1999-03-11 08:13:39
Message-ID: 004201be6bb0$8df655e0$2285d4c2@server.fonet2.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> It's good idea, but if I would change not the name, but properties for example :
>> create table pokus (col1 int, col2 varchar (20));
>>
>> and now I would col1 as col1 int default 5 and col2 varchar (20) not null.
>> or col2 varchar (30)...
>>
>> I search many MB of text about SQL etc., but I found only command for
>> adding column or for the renaming it, but what about remove some
>> column or change properties of column?
>
>I've run into this problem many times.. best answer I've found has been to
>dump the database, recreate the table making any necessary changes, than
>copy the data back in.

Yes, I do this always too, but I prefer SQL syntax before manual editing dumped database....

Have somebody any idea?

Pavel PaJaSoft Janousek
FoNet, spol. s r.o.

Browse pgsql-general by date

  From Date Subject
Next Message David O'Farrell 1999-03-11 12:30:38 threads and libpq
Previous Message Ulf Mehlig 1999-03-11 07:54:34 Re: [GENERAL] dropping a table, leaving actual file in base/db/...