diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2022-01-23 03:36:55 +0100 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2022-01-23 03:53:18 +0100 |
commit | 7b65862e2280eafca00566ee44af2c1bbb143e9d (patch) | |
tree | 4b777a429e4fca66908363e09895776670dc556c /src | |
parent | 6d554e3fcd6fb8be2dbcbd3521e2947ed7a552cb (diff) | |
download | postgresql-7b65862e2280eafca00566ee44af2c1bbb143e9d.tar.gz postgresql-7b65862e2280eafca00566ee44af2c1bbb143e9d.zip |
Correct type of front_pathkey to PathKey
In sort_inner_and_outer we iterate a list of PathKey elements, but the
variable is declared as (List *). This mistake is benign, because we
only pass the pointer to lcons() and never dereference it.
This exists since ~2004, but it's confusing. So fix and backpatch to all
supported branches.
Backpatch-through: 10
Discussion: https://postgr.es/m/bf3a6ea1-a7d8-7211-0669-189d5c169374%40enterprisedb.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/optimizer/path/joinpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index f96fc9fd282..9a8c5165b04 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -1258,7 +1258,7 @@ sort_inner_and_outer(PlannerInfo *root, foreach(l, all_pathkeys) { - List *front_pathkey = (List *) lfirst(l); + PathKey *front_pathkey = (PathKey *) lfirst(l); List *cur_mergeclauses; List *outerkeys; List *innerkeys; |