Correct type of front_pathkey to PathKey

Tomas Vondra <tomas.vondra@postgresql.org>

Commit: 72ac4d71b54fdac5efc9ecfc23663f26c20ddcf9
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Date: 2022-01-23T03:05:08Z
Releases: 14.2
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

Files

PathChange+/−
src/backend/optimizer/path/joinpath.c modified +1 −1

Discussion