Skip to content
Snippets Groups Projects
Commit 6f018c6d authored by Peter Eisentraut's avatar Peter Eisentraut
Browse files

COPY: Add an assertion

This is for tools such as Coverity that don't know that the grammar
enforces that the case of not having a relation (but instead a query)
cannot happen in the FROM case.
parent e684ab5e
No related branches found
No related tags found
No related merge requests found
......@@ -797,6 +797,8 @@ DoCopy(const CopyStmt *stmt, const char *queryString)
if (is_from)
{
Assert(rel);
/* check read-only transaction */
if (XactReadOnly && rel->rd_backend != MyBackendId)
PreventCommandIfReadOnly("COPY FROM");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment