Thanks for the review.
On 2018/02/15 5:25, Alvaro Herrera wrote:
> This is looking attractive.
>
> Please don't #include postgres.h in partcache.h. That's per policy.
Oops, fixed.
> Why do you need to #include parsenodes.h in partcache.h?
I thought it was needed because there was this:
extern void check_new_partition_bound(char *relname, Relation parent,
PartitionBoundSpec *spec);
in partcache.h and PartitionBoundSpec is defined in parsenodes.h.
Removing the #include turned out to be fine, that is, after I put it in
partition.h instead.
> I think rewriteManip.h can do with just relcache.h rather than rel.h
> (probably partition.h can do likewise)
Hmm. map_partition_varattnos() that I moved to rewriteManip.c wants to
use RelationGetDescr(), but partition.h was fine.
Attached updated patch.
Thanks,
Amit