Re: Changing from base type to inherited

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing from base type to inherited
Дата
Msg-id 23689.1092280678@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Changing from base type to inherited  (Scott Ribe <scott_ribe@killerbytes.com>)
Ответы Re: Changing from base type to inherited  (Scott Ribe <scott_ribe@killerbytes.com>)
Список pgsql-general
Scott Ribe <scott_ribe@killerbytes.com> writes:
> 1) Is there any way to change a row of table A into one of the inherited
> types, other than deleting and inserting?

Nope.

> 2) If I must delete & insert, is there any shortcut to somehow say rec2.A =
> rec1 rather than referencing the columns of the base table individually?

Can't you do something like

    INSERT INTO B SELECT *, some-more-values FROM A WHERE ...

            regards, tom lane

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

Предыдущее
От: Eric B.Ridge
Дата:
Сообщение: PG 8.0beta: psql suggestion
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: Changing from base type to inherited