Fix to to use NIL to judge a List is empty or not.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 26 Sep 2022 02:31:42 +0000 (11:31 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 26 Sep 2022 02:31:42 +0000 (11:31 +0900)
Previously it mistakenly judge by the value of the pointer itself is
NULL, which is not allowed by our coding standard.

src/parser/outfuncs.c

index 77645378cd804ecff92aedfc1a6241202d566d64..2ed60b58da887fb619c890bd733ce4fd06bc2e18 100644 (file)
@@ -2578,7 +2578,7 @@ _outMergeStmt(StringInfo str, MergeStmt *node)
                _outNode(str, node->joinCondition);
        }
 
-       if (node->mergeWhenClauses)
+       if (node->mergeWhenClauses != NIL)
        {
                _outMergeWhenClauses(str, node->mergeWhenClauses);
        }