| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Odd behavior with PG_TRY |
| Дата | |
| Msg-id | 18635.1483730696@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Odd behavior with PG_TRY (Kevin Grittner <kgrittn@gmail.com>) |
| Список | pgsql-hackers |
Kevin Grittner <kgrittn@gmail.com> writes:
> On Fri, Jan 6, 2017 at 5:43 AM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> If a variable is modified within PG_TRY and then referenced in
>> PG_CATCH it needs to be marked as volatile to be strictly in
>> conformance with POSIX. This also ensures that any compiler does not
>> do any stupid optimizations with those variables in the way they are
>> referenced and used.
> That sort of begs the question of why PG_exception_stack is not
> marked as volatile, since the macros themselves modify it within
> the PG_TRY block and reference it within the PG_CATCH block. Is
> there some reason this variable is immune to the problem?
It's not a local variable.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера