Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6d56c50

Browse files
committed
A minor simplification for List manipulation
Fix one place that was using lfirst(list_head(list)) by using linitial(list) instead. They are equivalent but the latter is simpler. We did the same in 9d299a4. Author: Richard Guo <guofenglinux@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAMbWs49dJnpezDQDDxCPKq7+=_3NyqLqGqnhqCjd+dYe4MS15w@mail.gmail.com
1 parent dc6070b commit 6d56c50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/rewrite/rewriteSearchCycle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ rewriteSearchAndCycle(CommonTableExpr *cte)
523523

524524
fexpr = makeFuncExpr(F_INT8INC, INT8OID, list_make1(fs), InvalidOid, InvalidOid, COERCE_EXPLICIT_CALL);
525525

526-
lfirst(list_head(search_col_rowexpr->args)) = fexpr;
526+
linitial(search_col_rowexpr->args) = fexpr;
527527

528528
texpr = (Expr *) search_col_rowexpr;
529529
}

0 commit comments

Comments
 (0)