Re: [HACKERS] Odd behavior with PG_TRY

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [HACKERS] Odd behavior with PG_TRY
Дата
Msg-id CACjxUsOas==3bidEaapsnr37SuRY3_gVoAbJ+AKDbberAGTe1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Odd behavior with PG_TRY  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Odd behavior with PG_TRY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] merging some features from plpgsql2 project
Следующее
От: "Daniel Verite"
Дата:
Сообщение: [HACKERS] Off-by-one oddity in minval for decreasing sequences