Re: patch for check constraints using multiple inheritance - Mailing list pgsql-hackers

From Robert Haas
Subject Re: patch for check constraints using multiple inheritance
Date
Msg-id AANLkTi=ZkGjzZTJ-hrnJzPYLhM822ygUnvFBskQynJFJ@mail.gmail.com
Whole thread Raw
In response to Re: patch for check constraints using multiple inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jul 30, 2010 at 11:39 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Yeb Havinga <yebhavinga@gmail.com> writes:
>> Regard the following lattice (direction from top to bottom):
>
>> 1
>> |\
>> 2 3
>>  \|\
>>   4 5
>>    \|
>>     6
>
>> When adding a constraint to 1, the proper coninhcount for that
>> constraint on relation 6 is 2. But the code currently counts to 3, since
>> 6 is reached by paths 1-2-4-5, 1-3-4-6, 1-3-5-6.
>
> Mph.  I'm not sure that 3 is wrong.  You have to consider what happens
> during a DROP CONSTRAINT, which as far as I saw this patch didn't
> address.

The behavior of DROP CONSTRAINT matches the fine documentation.  The
behavior of ADD CONSTRAINT does not.  Perhaps there's a definition of
coninhcount that would make 3 the right answer, but (a) I'm not sure
what that definition would be and (b) it's certainly not the one in
the manual.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: patch for check constraints using multiple inheritance
Next
From: Greg Smith
Date:
Subject: Re: merge command - GSoC progress