diff options
Diffstat (limited to 'src/backend/commands/copyto.c')
-rw-r--r-- | src/backend/commands/copyto.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index f87e405351d..67b94b91cae 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -199,7 +199,7 @@ CopyToTextLikeStart(CopyToState cstate, TupleDesc tupDesc) cstate->file_encoding); /* if a header has been requested send the line */ - if (cstate->opts.header_line) + if (cstate->opts.header_line == COPY_HEADER_TRUE) { ListCell *cur; bool hdr_delim = false; @@ -835,7 +835,7 @@ BeginCopyTo(ParseState *pstate, ((DR_copy *) dest)->cstate = cstate; /* Create a QueryDesc requesting no output */ - cstate->queryDesc = CreateQueryDesc(plan, NULL, pstate->p_sourcetext, + cstate->queryDesc = CreateQueryDesc(plan, pstate->p_sourcetext, GetActiveSnapshot(), InvalidSnapshot, dest, NULL, NULL, 0); @@ -845,8 +845,7 @@ BeginCopyTo(ParseState *pstate, * * ExecutorStart computes a result tupdesc for us */ - if (!ExecutorStart(cstate->queryDesc, 0)) - elog(ERROR, "ExecutorStart() failed unexpectedly"); + ExecutorStart(cstate->queryDesc, 0); tupDesc = cstate->queryDesc->tupDesc; } |