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.
This commit is contained in:
parent
e684ab5e1e
commit
6f018c6dda
|
@ -797,6 +797,8 @@ DoCopy(const CopyStmt *stmt, const char *queryString)
|
||||||
|
|
||||||
if (is_from)
|
if (is_from)
|
||||||
{
|
{
|
||||||
|
Assert(rel);
|
||||||
|
|
||||||
/* check read-only transaction */
|
/* check read-only transaction */
|
||||||
if (XactReadOnly && rel->rd_backend != MyBackendId)
|
if (XactReadOnly && rel->rd_backend != MyBackendId)
|
||||||
PreventCommandIfReadOnly("COPY FROM");
|
PreventCommandIfReadOnly("COPY FROM");
|
||||||
|
|
Loading…
Reference in New Issue