Re: tracking inherited columns (was: patch for check constraints using multiple inheritance) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tracking inherited columns (was: patch for check constraints using multiple inheritance)
Date
Msg-id 540.1281016763@sss.pgh.pa.us
Whole thread Raw
In response to Re: tracking inherited columns (was: patch for check constraints using multiple inheritance)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: tracking inherited columns (was: patch for check constraints using multiple inheritance)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Yeb Havinga <yebhavinga@gmail.com> writes:
>> The root cause seems to center around multiple inheritance of the same
>> column without a common ancestor. Another way to approach the problem, is to
>> prevent the user to create a setup, i.e. when adding a column to B that
>> already exists in A, or when adding a inheritance relation A-C or B-c, if A
>> and B share column names. He could then get a hint he should add a common
>> ancestor with that column. This preemptively prevents problems with renames
>> and other changes.

> It also breaks compatibility with previous releases for no particular
> reason.

Well, if it were only a hint, and thus didn't actually "prevent"
anything, then it wouldn't be breaking compatibility.  But I don't
like the idea much either.  It would be extremely expensive, if not
impossible, to determine whether all parents having the similarly-named
column got it from the same common ancestor.  (In particular, if the
user had previously ignored the hint, you could have situations where
there isn't a unique ancestor that the column can be traced to; then
what do you do?)

I think we'd be putting huge amounts of effort into a case that no more
than one or two people would ever hit.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pg_stat_user_functions' notion of user
Next
From: Tom Lane
Date:
Subject: Re: Online backup cause boot failure, anyone know why?