pgsql: Adjust DatumGetBool macro so that it isn't fooled by garbage in

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Adjust DatumGetBool macro so that it isn't fooled by garbage in
Дата
Msg-id 20070323202441.95A009FB68B@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Adjust DatumGetBool macro so that it isn't fooled by garbage in the Datum
to the left of the actual bool value.  While in most cases there won't be
any, our support for old-style user-defined functions violates the C spec
to the extent of calling functions that might return char or short through
a function pointer declared to return "char *", which we then coerce to
Datum.  It is not surprising that the result might contain garbage
high-order bits ... what is surprising is that we didn't see such cases
long ago.  Per report from Magnus.

Modified Files:
--------------
    pgsql/src/include:
        postgres.h (r1.77 -> r1.78)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/postgres.h.diff?r1=1.77&r2=1.78)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix plancache so that any required replanning is done with the
Следующее
От: alvherre@postgresql.org (Alvaro Herrera)
Дата:
Сообщение: pgsql: We no longer need to palloc the VacuumStmt node; keeping it on