Re: [HACKERS] Constraint exclusion for partitioned tables - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Constraint exclusion for partitioned tables
Date
Msg-id CA+TgmoY6iD1Cqt=Uk3wyNm9SxN0gOEg3jk8ep=+b7V5pSjBmTA@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Constraint exclusion for partitioned tables  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: [HACKERS] Constraint exclusion for partitioned tables  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
List pgsql-hackers
On Thu, Apr 6, 2017 at 6:47 AM, Ashutosh Bapat
<ashutosh.bapat@enterprisedb.com> wrote:
> I am guessing that for normal inheritance, a constraint on parent
> doesn't necessarily imply the same constraint on the child (Amit
> Langote gives me an example of NOT NULL constraint).

CHECK constraints that apply to the parent would apply to all
children, unless they are NO INHERIT, so even for regular inheritance,
it might still be possible to prove something by ignoring things that
won't necessarily cascade.

For partitioning, it may be that we've got enough restrictions in
place on what can happen that we can assume everything can cascade.
Actually, I hope that's true, since the partitioned table has no
storage of its own.

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



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Partitioning vs ON CONFLICT