Skip to content

Commit 52eed3d

Browse files
committed
Fix segmentation fault that an empty prepared statement could cause.
Back-patch to all supported branches. Per bug #11335 from Haruka Takatsuka
1 parent 3eb02dc commit 52eed3d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/tcop/utility.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,9 @@ GetCommandLogLevel(Node *parsetree)
24292429
{
24302430
LogStmtLevel lev;
24312431

2432+
if (parsetree == NULL)
2433+
return LOGSTMT_ALL;
2434+
24322435
switch (nodeTag(parsetree))
24332436
{
24342437
/* raw plannable queries */

0 commit comments

Comments
 (0)