git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc6070b)
A minor simplification for List manipulation
Mon, 3 Jul 2023 09:35:15 +0000 (11:35 +0200)
Mon, 3 Jul 2023 09:39:03 +0000 (11:39 +0200)
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 <guofenglinux@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAMbWs49dJnpezDQDDxCPKq7+=_3NyqLqGqnhqCjd+dYe4MS15w@mail.gmail.com


diff --git a/src/backend/rewrite/rewriteSearchCycle.c b/src/backend/rewrite/rewriteSearchCycle.c
index b7c8e06fa2db70daa1b2ef6daa61fa02dc713245..428a98ef2bb39ae9b539efcd51216dc4b8af0468 100644 (file)
--- 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;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /