From:
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: ALTER TABLE TODO items
Date:
2004-05-05 17:51:23
Message-ID:
200405051751.i45HpNu11161@candle.pha.pa.us (view raw or flat )
Thread:
2004-05-05 04:48:48 from tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
2004-05-05 05:27:09 from Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
2004-05-05 14:36:36 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2004-05-05 15:30:36 from Stephen Frost <sfrost(at)snowman(dot)net>
2004-05-05 15:38:34 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2004-05-05 16:52:15 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2004-05-05 16:53:41 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2004-05-05 16:38:31 from Gaetano Mendola <mendola(at)bigfoot(dot)com>
2004-05-05 17:04:31 from Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
2004-05-05 17:47:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2004-05-05 17:51:23 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2004-05-05 17:59:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2004-05-05 19:45:39 from Richard Huxton <dev(at)archonet(dot)com>
2004-05-05 19:50:02 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2004-05-06 03:00:29 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2004-05-06 07:51:05 from Richard Huxton <dev(at)archonet(dot)com>
2004-05-06 15:47:13 from "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
2004-05-06 19:02:02 from Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
2004-05-06 19:04:32 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2004-05-07 08:16:22 from Richard Huxton <dev(at)archonet(dot)com>
2004-05-06 01:45:03 from Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Lists:
pgsql-committers pgsql-hackers
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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
In response to
Responses
pgsql-hackers by date
Next :From: Tom LaneDate: 2004-05-05 17:59:04
Subject : Re: ALTER TABLE TODO items
Previous :From : F HarvellDate : 2004-05-05 17:49:11
Subject : Re: Postgres Crashes
pgsql-committers by date
Next :From: Tom LaneDate: 2004-05-05 17:59:04
Subject : Re: ALTER TABLE TODO items
Previous :From : Tom LaneDate : 2004-05-05 17:47:21
Subject : Re: ALTER TABLE TODO items