Re: Inherits is not encouraged?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inherits is not encouraged?
Дата
Msg-id 18165.1236642935@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Inherits is not encouraged?  (Emi Lu <emilu@encs.concordia.ca>)
Ответы Re: Inherits is not encouraged?  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список pgsql-sql
Emi Lu <emilu@encs.concordia.ca> writes:
> (1) Is possible that I could change the column of a table that is 
> defined by Inherits?

> e.g., t1(col1, col2, col3); create table tx(colx) Inherits (t1)
> I'd like to get tx shown as (col1, colx, col2, col3).

No, you don't really have a lot of control over that.  It'll stick
non-inherited columns at the end.

> (2) Logically, I have a table inherited from two other tables, but no 
> more other columns. Will it not be encouraged to do so?

> e.g., t1 (col1... coln)
>       t2 (col1... coln)
>       create t3() Inherits (t1, t2) without OID

Sure, that's allowed.
        regards, tom lane


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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Inherits is not encouraged?
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Inherits is not encouraged?