Re: reorganizing partitioning code
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-15T02:57:18Z
Lists: pgsql-hackers
Attachments
- v3-0001-Reorganize-partitioning-code.patch (text/plain) patch v3-0001
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
Commits
-
Reorganize partitioning code
- da6f3e45ddb6 11.0 landed