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)
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