Re: Writing triggers in C++ - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Writing triggers in C++
Date
Msg-id 1171471102.5454.297.camel@localhost.localdomain
Whole thread Raw
In response to Re: Writing triggers in C++  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Writing triggers in C++  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
On Wed, 2007-02-14 at 13:19 -0300, Alvaro Herrera wrote:
> Probably stack allocation doesn't matter much, as I think that would be
> unwinded by the longjmp call.  I don't know a lot about C++, but if
> there are allocations in the data area then those would probably not be
> freed.  But it makes me wonder -- is longjmp very compatible with C++
> exceptions at all?

"C-style stack unwinding (using setjmp and longjmp from <csetjmp>) is
incompatible with exception-handling and is best avoided." (Stroustrup,
p. 433).

Which presumably means that in practice, the interaction between these
features is implementation-defined.

-Neil




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: integer datetimes
Next
From: Andrew Dunstan
Date:
Subject: Re: "anyelement2" pseudotype