[COMMITTERS] pgsql: Fix miserable coding in pg_stat_get_activity().

2016-09-10 Thread Tom Lane
Fix miserable coding in pg_stat_get_activity(). Commit dd1a3bccc replaced a test on whether a subroutine returned a null pointer with a test on whether &pointer->backendStatus was null. This accidentally failed to fail, at least on common compilers, because backendStatus is the first field in the

[COMMITTERS] pgsql: Fix miserable coding in pg_stat_get_activity().

2016-09-10 Thread Tom Lane
Fix miserable coding in pg_stat_get_activity(). Commit dd1a3bccc replaced a test on whether a subroutine returned a null pointer with a test on whether &pointer->backendStatus was null. This accidentally failed to fail, at least on common compilers, because backendStatus is the first field in the

[COMMITTERS] pgsql: Fix miserable coding in pg_stat_get_activity().

2016-09-10 Thread Tom Lane
Fix miserable coding in pg_stat_get_activity(). Commit dd1a3bccc replaced a test on whether a subroutine returned a null pointer with a test on whether &pointer->backendStatus was null. This accidentally failed to fail, at least on common compilers, because backendStatus is the first field in the

[COMMITTERS] pgsql: Fix miserable coding in pg_stat_get_activity().

2016-09-10 Thread Tom Lane
Fix miserable coding in pg_stat_get_activity(). Commit dd1a3bccc replaced a test on whether a subroutine returned a null pointer with a test on whether &pointer->backendStatus was null. This accidentally failed to fail, at least on common compilers, because backendStatus is the first field in the

[COMMITTERS] pgsql: Improve unreachability recognition in elog() macro.

2016-09-10 Thread Tom Lane
Improve unreachability recognition in elog() macro. Some experimentation with an older version of gcc showed that it is able to determine whether "if (elevel_ >= ERROR)" is compile-time constant if elevel_ is declared "const", but otherwise not so much. We had accounted for that in ereport() but

[COMMITTERS] pgsql: Improve unreachability recognition in elog() macro.

2016-09-10 Thread Tom Lane
Improve unreachability recognition in elog() macro. Some experimentation with an older version of gcc showed that it is able to determine whether "if (elevel_ >= ERROR)" is compile-time constant if elevel_ is declared "const", but otherwise not so much. We had accounted for that in ereport() but

[COMMITTERS] pgsql: Improve unreachability recognition in elog() macro.

2016-09-10 Thread Tom Lane
Improve unreachability recognition in elog() macro. Some experimentation with an older version of gcc showed that it is able to determine whether "if (elevel_ >= ERROR)" is compile-time constant if elevel_ is declared "const", but otherwise not so much. We had accounted for that in ereport() but

[COMMITTERS] pgsql: Improve unreachability recognition in elog() macro.

2016-09-10 Thread Tom Lane
Improve unreachability recognition in elog() macro. Some experimentation with an older version of gcc showed that it is able to determine whether "if (elevel_ >= ERROR)" is compile-time constant if elevel_ is declared "const", but otherwise not so much. We had accounted for that in ereport() but

[COMMITTERS] pgsql: Improve unreachability recognition in elog() macro.

2016-09-10 Thread Tom Lane
Improve unreachability recognition in elog() macro. Some experimentation with an older version of gcc showed that it is able to determine whether "if (elevel_ >= ERROR)" is compile-time constant if elevel_ is declared "const", but otherwise not so much. We had accounted for that in ereport() but