Content-Length: 258110 | pFad | http://github.com/postgrespro/postgres/commit/6d56c501a75fe0fd0b7104b3efee55e1cea8e80a

83 A minor simplification for List manipulation · postgrespro/postgres@6d56c50 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/6d56c501a75fe0fd0b7104b3efee55e1cea8e80a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy