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

Commit7c15a2a

Browse files
committed
fix warnings reported by clang-analyzer
1 parent3d0aa71 commit7c15a2a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎src/copy_stmt_hooking.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ PathmanDoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
160160
boolis_from=stmt->is_from;
161161
boolpipe= (stmt->filename==NULL);
162162
Relationrel;
163-
Oidrelid;
164163
Node*query=NULL;
165164
List*range_table=NIL;
166165

@@ -194,8 +193,6 @@ PathmanDoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
194193
/* Open the relation (we've locked it in is_pathman_related_copy()) */
195194
rel=heap_openrv(stmt->relation,NoLock);
196195

197-
relid=RelationGetRelid(rel);
198-
199196
rte=makeNode(RangeTblEntry);
200197
rte->rtekind=RTE_RELATION;
201198
rte->relid=RelationGetRelid(rel);
@@ -280,7 +277,6 @@ PathmanDoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
280277
Assert(stmt->query);
281278

282279
query=stmt->query;
283-
relid=InvalidOid;
284280
rel=NULL;
285281
}
286282

@@ -291,7 +287,7 @@ PathmanDoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
291287
Assert(rel);
292288

293289
/* check read-only transaction and parallel mode */
294-
if (XactReadOnly&& !rel->rd_islocaltemp)
290+
if (XactReadOnly&&rel&&!rel->rd_islocaltemp)
295291
PreventCommandIfReadOnly("PATHMAN COPY FROM");
296292
PreventCommandIfParallelMode("PATHMAN COPY FROM");
297293

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp