mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
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.
This commit is contained in:
parent
617db3a2d8
commit
590e2d12f0
@ -25,7 +25,6 @@
|
|||||||
#include "access/sysattr.h"
|
#include "access/sysattr.h"
|
||||||
#include "access/xact.h"
|
#include "access/xact.h"
|
||||||
#include "access/xlog.h"
|
#include "access/xlog.h"
|
||||||
#include "catalog/namespace.h"
|
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
#include "commands/copy.h"
|
#include "commands/copy.h"
|
||||||
#include "commands/defrem.h"
|
#include "commands/defrem.h"
|
||||||
@ -37,12 +36,10 @@
|
|||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
#include "optimizer/clauses.h"
|
#include "optimizer/clauses.h"
|
||||||
#include "optimizer/planner.h"
|
#include "optimizer/planner.h"
|
||||||
#include "parser/parse_relation.h"
|
|
||||||
#include "nodes/makefuncs.h"
|
#include "nodes/makefuncs.h"
|
||||||
#include "rewrite/rewriteHandler.h"
|
#include "rewrite/rewriteHandler.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
#include "tcop/tcopprot.h"
|
#include "tcop/tcopprot.h"
|
||||||
#include "utils/acl.h"
|
|
||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
#include "utils/lsyscache.h"
|
#include "utils/lsyscache.h"
|
||||||
#include "utils/memutils.h"
|
#include "utils/memutils.h"
|
||||||
@ -1413,7 +1410,7 @@ BeginCopy(bool is_from,
|
|||||||
Assert(query->utilityStmt == NULL);
|
Assert(query->utilityStmt == NULL);
|
||||||
|
|
||||||
/* plan the query */
|
/* plan the query */
|
||||||
plan = planner(query, 0, NULL);
|
plan = pg_plan_query(query, 0, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* With row level security and a user using "COPY relation TO", we
|
* With row level security and a user using "COPY relation TO", we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user