Skip to content

Commit 590e2d1

Browse files
committed
COPY: use pg_plan_query() instead of planner()
While at it, trim the includes list in copy.c. The planner headers cannot be removed, but there are a few others that are not of any use.
1 parent 617db3a commit 590e2d1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/backend/commands/copy.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "access/sysattr.h"
2626
#include "access/xact.h"
2727
#include "access/xlog.h"
28-
#include "catalog/namespace.h"
2928
#include "catalog/pg_type.h"
3029
#include "commands/copy.h"
3130
#include "commands/defrem.h"
@@ -37,12 +36,10 @@
3736
#include "miscadmin.h"
3837
#include "optimizer/clauses.h"
3938
#include "optimizer/planner.h"
40-
#include "parser/parse_relation.h"
4139
#include "nodes/makefuncs.h"
4240
#include "rewrite/rewriteHandler.h"
4341
#include "storage/fd.h"
4442
#include "tcop/tcopprot.h"
45-
#include "utils/acl.h"
4643
#include "utils/builtins.h"
4744
#include "utils/lsyscache.h"
4845
#include "utils/memutils.h"
@@ -1413,7 +1410,7 @@ BeginCopy(bool is_from,
14131410
Assert(query->utilityStmt == NULL);
14141411

14151412
/* plan the query */
1416-
plan = planner(query, 0, NULL);
1413+
plan = pg_plan_query(query, 0, NULL);
14171414

14181415
/*
14191416
* With row level security and a user using "COPY relation TO", we

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy