ereport bug

Поиск
Список
Период
Сортировка
От Dmitry Voronin
Тема ereport bug
Дата
Msg-id 43691421062049@web19g.yandex.ru
обсуждение
Ответы Re: ereport bug
Re: ereport bug
Список pgsql-hackers
Hello, postgresmen!
 
I found incorrect execution of ereport() macro.
If we pass into ereport() function 2 or more arguments, the macro errcontext does not correct execute. So, ereport() call stack is:
 
errstart
errcontext_msg
set_errcontext_domain
errmsg
errfinish
pg_unreachable
 
This bug causes that error messages (for example, in PL/TCL) are not localized.

Solutions:
- Wrap all errcontext() macro in
brackets, that is errcontext("error message %s", "end message") -> (errcontext("error message %s", "end message"))
- Rewrite this macro
- ???
 
I am attaching to this letter a test case that shows the behavior errcontext() macro and the way to fix it.

I am using postgresql 9.4 and test it on gcc 4.7 and gcc 4.8.1.

-- Best regards, Dmitry Voronin

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