pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Change some test macros to return true booleans 6+ messages / 1 participants [nested] [flat]
* pgsql: Change some test macros to return true booleans @ 2017-01-18 21:09 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2017-01-18 21:09 UTC (permalink / raw) To: 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(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Change some test macros to return true booleans @ 2017-01-18 21:09 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2017-01-18 21:09 UTC (permalink / raw) To: 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 ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/fce4609d5e5b7fc01e921f9fa3a6e75356284db6 Modified Files -------------- src/include/access/htup_details.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Change some test macros to return true booleans @ 2017-01-18 21:09 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2017-01-18 21:09 UTC (permalink / raw) To: 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 ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/5f4ae4f3cd58d885593c0c56482d99d06b47a3ad Modified Files -------------- src/include/access/htup_details.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Change some test macros to return true booleans @ 2017-01-18 21:09 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2017-01-18 21:09 UTC (permalink / raw) To: 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 ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/75c155f65b046686242ece4bbfb688359f28feea Modified Files -------------- src/include/access/htup_details.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Change some test macros to return true booleans @ 2017-01-18 21:09 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2017-01-18 21:09 UTC (permalink / raw) To: 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 ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/e0f4a80ee515fab2922bf2a3f68dc6d1efdbf05e Modified Files -------------- src/include/access/htup_details.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Change some test macros to return true booleans @ 2017-01-18 21:09 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2017-01-18 21:09 UTC (permalink / raw) To: 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 ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/5462e3486dfeb5876d1c5a408eecab12b9fc4545 Modified Files -------------- src/include/access/htup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2017-01-18 21:09 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-01-18 21:09 pgsql: Change some test macros to return true booleans Alvaro Herrera <alvherre@alvh.no-ip.org> 2017-01-18 21:09 pgsql: Change some test macros to return true booleans Alvaro Herrera <alvherre@alvh.no-ip.org> 2017-01-18 21:09 pgsql: Change some test macros to return true booleans Alvaro Herrera <alvherre@alvh.no-ip.org> 2017-01-18 21:09 pgsql: Change some test macros to return true booleans Alvaro Herrera <alvherre@alvh.no-ip.org> 2017-01-18 21:09 pgsql: Change some test macros to return true booleans Alvaro Herrera <alvherre@alvh.no-ip.org> 2017-01-18 21:09 pgsql: Change some test macros to return true booleans Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox