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

Commitb822ae1

Browse files
committed
Use lfirst_int in cmp_list_len_contents_asc
The function added inbe45be9 is comparing integer lists (IntList) bylength and contents, but there were two bugs. Firstly, it used intVal()to extract the value, but that's for Value nodes, not for extracting intvalues from IntList. Secondly, it called it directly on the ListCell,without doing lfirst(). So just do lfirst_int() instead.Interestingly enough, this did not cause any crashes on the buildfarm,but valgrind rightfully complained about it.Discussion:https://postgr.es/m/bf3805a8-d7d1-ae61-fece-761b7ff41ecc@postgresfriends.org
1 parentd00fbdc commitb822ae1

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
@@ -1750,8 +1750,8 @@ cmp_list_len_contents_asc(const ListCell *a, const ListCell *b)
17501750

17511751
forboth(lca,la,lcb,lb)
17521752
{
1753-
intva=intVal(lca);
1754-
intvb=intVal(lcb);
1753+
intva=lfirst_int(lca);
1754+
intvb=lfirst_int(lcb);
17551755
if (va>vb)
17561756
return1;
17571757
if (va<vb)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp