Re: Changing from base type to inherited

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
Cc: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Changing from base type to inherited
Date: 2004-08-12 03:17:58
Message-ID: 23689.1092280678@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Ribe <scott_ribe(at)killerbytes(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2004-08-12 03:52:06 Re: Changing from base type to inherited
Previous Message David Fetter 2004-08-12 02:07:07 Re: [HACKERS] Coming soon: PG 7.4.4, 7.3.7, 7.2.5