diff options
author | Tomas Vondra | 2022-01-23 02:36:55 +0000 |
---|---|---|
committer | Tomas Vondra | 2022-01-23 02:56:44 +0000 |
commit | 5e9fe25307711030ca7168b78a369e30e1980887 (patch) | |
tree | 14469b1cdab79eb9fb65518f278e69973131ec08 | |
parent | 26c841ed1b2d4ca33bc530a12956eb690253fdb2 (diff) |
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
-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 1a00200ac1b..7844a5b2a0e 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -996,7 +996,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; |