summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2023-07-03 09:35:15 +0000
committerPeter Eisentraut2023-07-03 09:39:03 +0000
commit6d56c501a75fe0fd0b7104b3efee55e1cea8e80a (patch)
tree3603d782e9564ea6d9eea1121e1a75e3d9d61cac
parentdc6070bf5deec475b7efecaabf71eb9b49633973 (diff)
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 9d299a49. Author: Richard Guo <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/CAMbWs49dJnpezDQDDxCPKq7+=_3NyqLqGqnhqCjd+dYe4MS15w@mail.gmail.com
-rw-r--r--src/backend/rewrite/rewriteSearchCycle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/rewrite/rewriteSearchCycle.c b/src/backend/rewrite/rewriteSearchCycle.c
index b7c8e06fa2d..428a98ef2bb 100644
--- a/src/backend/rewrite/rewriteSearchCycle.c
+++ b/src/backend/rewrite/rewriteSearchCycle.c
@@ -523,7 +523,7 @@ rewriteSearchAndCycle(CommonTableExpr *cte)
fexpr = makeFuncExpr(F_INT8INC, INT8OID, list_make1(fs), InvalidOid, InvalidOid, COERCE_EXPLICIT_CALL);
- lfirst(list_head(search_col_rowexpr->args)) = fexpr;
+ linitial(search_col_rowexpr->args) = fexpr;
texpr = (Expr *) search_col_rowexpr;
}