pgsql: Fix misuse of Relids for storing attribute numbers

From: Richard Guo <rguo(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix misuse of Relids for storing attribute numbers
Date: 2025-09-12 02:13:09
Message-ID: E1uwtHh-000Gvz-0x@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix misuse of Relids for storing attribute numbers

The typedef Relids (Bitmapset *) is intended to represent set of
relation identifiers, but was incorrectly used in several places to
store sets of attribute numbers. This is my oversight in e2debb643.

Fix that by replacing such usages with Bitmapset * to reflect the
correct semantics.

Author: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Reviewed-by: Tender Wang <tndrwang(at)gmail(dot)com>
Reviewed-by: Richard Guo <guofenglinux(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAEG8a3LJhp_xriXf39iCz0TsK+M-2biuhDhpLC6Baxw8+ZYT3A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2d756ebbe857e3d395d18350bf232300ebd23981

Modified Files
--------------
src/backend/optimizer/util/clauses.c | 2 +-
src/backend/optimizer/util/plancat.c | 6 +++---
src/include/optimizer/plancat.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-09-12 05:35:36 pgsql: Silence compiler warnings on clang 21
Previous Message Michael Paquier 2025-09-12 01:31:36 pgsql: Add more information for WAL records of hash index AMs