pgsql: Don't prematurely cram a value into a short int. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Don't prematurely cram a value into a short int.
Date
Msg-id E1lRhiX-0003o7-EL@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Don't prematurely cram a value into a short int.

Since a4d75c86b, some buildfarm members have been warning that
                Assert(attnum <= MaxAttrNumber);
is useless if attnum is an AttrNumber.  I'm not certain how plausible
it is that the value coming out of the bitmap could actually exceed
MaxAttrNumber, but we seem to have thought that that was possible back
in 7300a6995.  Revert the intermediate variable to int so that we have
the same overflow protection as before.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c545e9524dcfcfce25c370f584b31562e8d7a4b7

Modified Files
--------------
src/backend/statistics/extended_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: Add a docs section for obsoleted and renamed functions and setti
Next
From: Tom Lane
Date:
Subject: pgsql: Fix portability and safety issues in pqTraceFormatTimestamp.