Re: how to make table inherits another ?

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: how to make table inherits another ?
Дата
Msg-id Pine.GSO.4.62.0502170051390.8005@ra.sai.msu.su
обсуждение исходный текст
Ответ на Re: how to make table inherits another ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 16 Feb 2005, Tom Lane wrote:

> 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.

Aha, that works. Thanks, Tom.

>
> 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.
>

I'll save this info.

>             regards, tom lane
>
    Regards,        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


В списке pgsql-hackers по дате отправления:

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