summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2021-03-19 23:57:50 +0100
committerTomas Vondra <tomas.vondra@postgresql.org>2021-03-20 00:04:25 +0100
commitb822ae13ea93c18326d58d47829bbc66d36fae5c (patch)
tree087c122b3e7073fa7c2c283ac3dac8eddcec7211 /src/backend/access/gist/gistutil.c
parentd00fbdc431192c3e429b3e91c43d364e5c7ba680 (diff)
downloadpostgresql-b822ae13ea93c18326d58d47829bbc66d36fae5c.tar.gz
Use lfirst_int in cmp_list_len_contents_asc
The function added in be45be9c33 is comparing integer lists (IntList) by length and contents, but there were two bugs. Firstly, it used intVal() to extract the value, but that's for Value nodes, not for extracting int values 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
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions