[COMMITTERS] pgsql: Change some test macros to return true booleans

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема [COMMITTERS] pgsql: Change some test macros to return true booleans
Дата
Msg-id E1cTxTp-0007GU-32@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Change some test macros to return true booleans

These macros work fine when they are used directly in an "if" test or
similar, but as soon as the return values are assigned to boolean
variables (or passed as boolean arguments to some function), they become
bugs, hopefully caught by compiler warnings.  To avoid future problems,
fix the definitions so that they return actual booleans.

To further minimize the risk that somebody uses them in back-patched
fixes that only work correctly in branches starting from the current
master and not in old ones, back-patch the change to supported branches
as appropriate.

See also commit af4472bcb88ab36b9abbe7fd5858e570a65a2d1a, and the long
discussion (and larger patch) in the thread mentioned in its commit
message.

Discussion: https://postgr.es/m/18672.1483022414@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/594e61a1de03ab93779e7e3d853edb7859d5c3cf

Modified Files
--------------
src/include/access/htup_details.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: [COMMITTERS] pgsql: Implement array version of jsonb_delete and operator
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Reset the proper GUC in create_index test.