Re: reorganizing partitioning code

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reorganizing partitioning code
Date: 2018-02-15 02:57:18
Message-ID: c5a30fd8-da1d-ad3b-7efb-5bc31e327cde@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v3-0001-Reorganize-partitioning-code.patch text/plain 148.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message henry@visionlink.org 2018-02-15 02:59:35 Re: Cached/global query plans, autopreparation
Previous Message Peter Eisentraut 2018-02-15 02:25:12 Re: Python 3.7 support