pgsql: Don't prematurely cram a value into a short int.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Don't prematurely cram a value into a short int.
Дата
Msg-id E1lRhiX-0003o7-EL@gemulon.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: pgsql: Add a docs section for obsoleted and renamed functions and setti
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix portability and safety issues in pqTraceFormatTimestamp.