On 2017/08/01 12:45, Etsuro Fujita wrote: > On 2017/08/01 10:18, Amit Langote wrote: >> Good points; fixed in the updated patch. > > I should have mentioned this in an earlier mail, but one thing I noticed > is this: > > - the remote server. > + the remote server. That becomes especially important if the table is > + being used in a partition hierarchy, where it is recommended to add > + a constraint matching the partition constraint expression on > + the remote table. > > I think this would apply to CHECK constraints on foreign tables when > implementing partitioning with inheritance. Why do we only mention this > for partition constraints?
One thing to consider might be that while a user can mark user-defined CHECK constraints as being NOT VALID so that the planner doesn't consider them during constraint exclusion, the same cannot be done for internally generated partition constraints. Maybe, (for time being?), the planner should be taught to disregard foreign tables' partition constraint (if any) for constraint exclusion. > Other than that, the patch looks good to me. Thanks for the review. Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers