Re: [GENERAL] inheritence children with integer columns of differing width

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] inheritence children with integer columns of differing width
Дата
Msg-id 27242.1497881106@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [GENERAL] inheritence children with integer columns of differing width  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-general
Justin Pryzby <pryzby@telsasoft.com> writes:
> I wondered if anyone had considered allowing inheritence children to have
> different column types than the parent (and each other).

No, and it's not sane to consider it.

> I'm thinking of the trivial (?) case of smallint/int/bigint.

What's trivial about that?  Consider

       select * from parent_table where somefunc(intcol);

If somefunc takes integer, this is fine, but what are we supposed to do
if the corresponding column in the child is bigint?  Throw error for any
row where the value doesn't fit in int?  If so, what's the point of
letting the child column type be different?

            regards, tom lane


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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: [GENERAL] inheritence children with integer columns of differing width
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: [GENERAL] effective_io_concurrency increasing