Re: ALTER TABLE TODO items

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: ALTER TABLE TODO items
Дата
Msg-id 200405051751.i45HpNu11161@candle.pha.pa.us
обсуждение исходный текст
Ответ на ALTER TABLE TODO items  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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@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
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLE TODO items
Следующее
От: Bruce Momjian
Дата:
Сообщение: initdb failure in CVS