Re: how to make table inherits another ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: elein <elein(at)varlena(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to make table inherits another ?
Date: 2005-02-16 21:35:08
Message-ID: 28569.1108589708@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
> I know this. I need to create inheritance for already created tables.
> There is no way to do this using alter table, so I tried to
> define it by hand :)

Did you remember to set relhassubclass for the parent table?
AFAIR, all that you really need are that and the pg_inherits row.

It'd be a good idea to install a pg_depend entry, and to modify the
child's pg_attribute rows to show the columns as inherited (attislocal
and attinhcount) but I believe the latter would only bite you if you
tried to do ALTER commands on the tables later.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2005-02-16 21:53:09 Re: how to make table inherits another ?
Previous Message Joshua D. Drake 2005-02-16 21:35:01 Re: Help me recovering data