pgsql: Correct type of front_pathkey to PathKey

From: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Correct type of front_pathkey to PathKey
Date: 2022-01-23 03:12:57
Message-ID: E1nBTJJ-0008SF-5P@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5e9fe25307711030ca7168b78a369e30e1980887

Modified Files
--------------
src/backend/optimizer/path/joinpath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2022-01-23 03:13:16 pgsql: Correct type of front_pathkey to PathKey
Previous Message Tomas Vondra 2022-01-23 03:12:37 pgsql: Correct type of front_pathkey to PathKey