Re: Changing from base type to inherited - Mailing list pgsql-general

From Tom Lane
Subject Re: Changing from base type to inherited
Date
Msg-id 23689.1092280678@sss.pgh.pa.us
Whole thread Raw
In response to Changing from base type to inherited  (Scott Ribe <scott_ribe@killerbytes.com>)
Responses Re: Changing from base type to inherited  (Scott Ribe <scott_ribe@killerbytes.com>)
List 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 by date:

Previous
From: Eric B.Ridge
Date:
Subject: PG 8.0beta: psql suggestion
Next
From: Scott Ribe
Date:
Subject: Re: Changing from base type to inherited