Fix misuse of Relids for storing attribute numbers
authorRichard Guo <rguo@postgresql.org>
Fri, 12 Sep 2025 02:12:19 +0000 (11:12 +0900)
committerRichard Guo <rguo@postgresql.org>
Fri, 12 Sep 2025 02:12:19 +0000 (11:12 +0900)
commit2d756ebbe857e3d395d18350bf232300ebd23981
tree79bb7f86ee9317f1df8555119c18ca58caa806d1
parent528dadf691df3023fbb0bd71da5c6087c2d49d6a
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@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAEG8a3LJhp_xriXf39iCz0TsK+M-2biuhDhpLC6Baxw8+ZYT3A@mail.gmail.com
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/plancat.c
src/include/optimizer/plancat.h