Tom Lane wrote:
> select * from another;
> f1 | f2
> ----+-------
> 1 | one
> 2 | two
> 3 | three
> (3 rows)
>
> alter table another
> alter f1 type text using f2 || ' more',
> alter f2 type bigint using f1 * 10;
>
> select * from another;
> f1 | f2
> ------------+----
> one more | 10
> two more | 20
> three more | 30
> (3 rows)
Wow, you can reference different column as part of the alter column.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073