Re: COPY planning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY planning
Date: 2015-09-21 20:01:31
Message-ID: 7557.1442865691@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-09-21 20:19:03 Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?
Previous Message Andres Freund 2015-09-21 19:36:15 Re: LW_SHARED_MASK macro