|
25 | 25 | #include"access/sysattr.h"
|
26 | 26 | #include"access/xact.h"
|
27 | 27 | #include"access/xlog.h"
|
28 |
| -#include"catalog/namespace.h" |
29 | 28 | #include"catalog/pg_type.h"
|
30 | 29 | #include"commands/copy.h"
|
31 | 30 | #include"commands/defrem.h"
|
|
37 | 36 | #include"miscadmin.h"
|
38 | 37 | #include"optimizer/clauses.h"
|
39 | 38 | #include"optimizer/planner.h"
|
40 |
| -#include"parser/parse_relation.h" |
41 | 39 | #include"nodes/makefuncs.h"
|
42 | 40 | #include"rewrite/rewriteHandler.h"
|
43 | 41 | #include"storage/fd.h"
|
44 | 42 | #include"tcop/tcopprot.h"
|
45 |
| -#include"utils/acl.h" |
46 | 43 | #include"utils/builtins.h"
|
47 | 44 | #include"utils/lsyscache.h"
|
48 | 45 | #include"utils/memutils.h"
|
@@ -1413,7 +1410,7 @@ BeginCopy(bool is_from,
|
1413 | 1410 | Assert(query->utilityStmt==NULL);
|
1414 | 1411 |
|
1415 | 1412 | /* plan the query */
|
1416 |
| -plan=planner(query,0,NULL); |
| 1413 | +plan=pg_plan_query(query,0,NULL); |
1417 | 1414 |
|
1418 | 1415 | /*
|
1419 | 1416 | * With row level security and a user using "COPY relation TO", we
|
|