diff options
Diffstat (limited to 'src/backend/commands/copyto.c')
-rw-r--r-- | src/backend/commands/copyto.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 89a4f8f810e..b6eacd5baa8 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -438,14 +438,8 @@ BeginCopyTo(ParseState *pstate, /* * Run parse analysis and rewrite. Note this also acquires sufficient * locks on the source table(s). - * - * Because the parser and planner tend to scribble on their input, we - * make a preliminary copy of the source querytree. This prevents - * problems in the case that the COPY is in a portal or plpgsql - * function and is executed repeatedly. (See also the same hack in - * DECLARE CURSOR and PREPARE.) XXX FIXME someday. */ - rewritten = pg_analyze_and_rewrite(copyObject(raw_query), + rewritten = pg_analyze_and_rewrite(raw_query, pstate->p_sourcetext, NULL, 0, NULL); |