pgsql: Teach compiler that ereport(>=ERROR) does not return

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Teach compiler that ereport(>=ERROR) does not return
Дата
Msg-id E1T3fj3-0002Ag-8e@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Teach compiler that ereport(>=ERROR) does not return

When elevel >= ERROR, we add an abort() call to the ereport() macro to
give the compiler a hint that the ereport() expansion will not return,
but the abort() isn't actually reached because the longjmp happens in
errfinish().

Because the effect of ereport() varies with the elevel, we cannot use
standard compiler attributes such as noreturn for this.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/71450d7fd6c7cf7b3e38ac56e363bff6a681973c

Modified Files
--------------
src/include/utils/elog.h |    7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Remove external PID file on postmaster exit
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Add a note to the MVCC chapter that some things aren't transacti