Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d581ce

Browse files
committed
Fix misuse of foreach_delete_current().
Our coding convention requires this macro's result to be assignedback to the original List variable. In this usage, since theList could not become empty, there was no actual bug --- butsome compilers warned about it. Oversight inbe45be9.Discussion:https://postgr.es/m/35077b31-2d62-1e31-0e2e-ddb52d590b73@enterprisedb.com
1 parentbe45be9 commit1d581ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/parser/parse_agg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,11 +1844,11 @@ expand_grouping_sets(List *groupingSets, bool groupDistinct, int limit)
18441844
list_sort(result,cmp_list_len_contents_asc);
18451845

18461846
/* Finally, remove duplicates */
1847-
prev=list_nth_node(List,result,0);
1847+
prev=linitial_node(List,result);
18481848
for_each_from(cell,result,1)
18491849
{
18501850
if (equal(lfirst(cell),prev))
1851-
foreach_delete_current(result,cell);
1851+
result=foreach_delete_current(result,cell);
18521852
else
18531853
prev=lfirst(cell);
18541854
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp