Re: how to make table inherits another ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: how to make table inherits another ?
Date
Msg-id 28569.1108589708@sss.pgh.pa.us
Whole thread Raw
In response to Re: how to make table inherits another ?  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: how to make table inherits another ?  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
Oleg Bartunov <oleg@sai.msu.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


pgsql-hackers by date:

Previous
From: "Sergey E. Koposov"
Date:
Subject: Re: Strange RETURN NEXT behaviour in Postgres 8.0
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Help me recovering data