Re: COPY planning

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY planning
Date: 2015-09-22 12:51:35
Message-ID: 20150922125135.GN3685@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > I noticed that COPY calls planner() (this was introduced in 85188ab88).
> > I think it should be calling pg_plan_query() instead.
>
> +1 --- AFAICS, this is the *only* place that is going directly to
> planner() without going through pg_plan_query(); other utility
> functions such as CREATE TABLE AS do the latter.
>
> As far as the patch goes, do copy.c's #include's need adjustment?
> I'm wondering if optimizer/planner.h could be removed, in particular.

BeginCopyFrom still uses expression_planner(), at least..

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-09-22 13:00:55 Re: Rework the way multixact truncations work
Previous Message Gavin Flower 2015-09-22 11:21:11 Re: [HACKERS] pgsql: Use gender-neutral language in documentation