Re: [GENERAL] inheritence children with integer columns of differing width - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] inheritence children with integer columns of differing width
Date
Msg-id 27242.1497881106@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] inheritence children with integer columns of differing width  (Justin Pryzby <pryzby@telsasoft.com>)
List 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 by date:

Previous
From: Justin Pryzby
Date:
Subject: [GENERAL] inheritence children with integer columns of differing width
Next
From: Jeff Janes
Date:
Subject: Re: [GENERAL] effective_io_concurrency increasing