Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f018c6

Browse files
committed
COPY: Add an assertion
This is for tools such as Coverity that don't know that the grammarenforces that the case of not having a relation (but instead a query)cannot happen in the FROM case.
1 parente684ab5 commit6f018c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/backend/commands/copy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,8 @@ DoCopy(const CopyStmt *stmt, const char *queryString)
797797

798798
if (is_from)
799799
{
800+
Assert(rel);
801+
800802
/* check read-only transaction */
801803
if (XactReadOnly&&rel->rd_backend!=MyBackendId)
802804
PreventCommandIfReadOnly("COPY FROM");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp