Skip to content

Commit 95016ee

Browse files
committed
make clang-analyzer happy about 'rel'
1 parent 9fd99a3 commit 95016ee

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/copy_stmt_hooking.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,11 @@ PathmanDoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
294294
/* COPY ... FROM ... */
295295
if (is_from)
296296
{
297-
bool is_old_protocol;
298-
299-
is_old_protocol = PG_PROTOCOL_MAJOR(FrontendProtocol) < 3 &&
300-
stmt->filename == NULL;
297+
bool is_old_protocol = PG_PROTOCOL_MAJOR(FrontendProtocol) < 3 &&
298+
stmt->filename == NULL;
301299

302300
/* There should be relation */
303-
Assert(rel);
301+
if (!rel) elog(FATAL, "No relation for PATHMAN COPY FROM");
304302

305303
/* check read-only transaction and parallel mode */
306304
if (XactReadOnly && rel && !rel->rd_islocaltemp)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy