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