Handle DoCopy changes

Requires a non-nULL ParseState in PostgreSQL 10, so we make one.
pull/1439/head
Jason Petersen 2017-04-20 19:53:52 -06:00
parent 7cf2b48f64
commit d2d1d47150
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
1 changed files with 11 additions and 0 deletions

View File

@ -532,7 +532,18 @@ CopyTaskFilesFromDirectory(StringInfo schemaName, StringInfo relationName,
copyStatement->options = list_make1(copyOption); copyStatement->options = list_make1(copyOption);
} }
#if (PG_VERSION_NUM >= 100000)
{
ParseState *pstate = make_parsestate(NULL);
pstate->p_sourcetext = queryString;
DoCopy(pstate, copyStatement, -1, -1, &copiedRowCount);
free_parsestate(pstate);
}
#else
DoCopy(copyStatement, queryString, &copiedRowCount); DoCopy(copyStatement, queryString, &copiedRowCount);
#endif
copiedRowTotal += copiedRowCount; copiedRowTotal += copiedRowCount;
CommandCounterIncrement(); CommandCounterIncrement();
} }