Re: how to make table inherits another ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to make table inherits another ?
Дата
Msg-id 28569.1108589708@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: how to make table inherits another ?  (Oleg Bartunov <oleg@sai.msu.su>)
Ответы Re: how to make table inherits another ?  (Oleg Bartunov <oleg@sai.msu.su>)
Список 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 по дате отправления:

Предыдущее
От: "Sergey E. Koposov"
Дата:
Сообщение: Re: Strange RETURN NEXT behaviour in Postgres 8.0
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Help me recovering data