From: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org, "Soules, Craig" <craig(dot)soules(at)hp(dot)com> |
Subject: | Re: Issues with C++ exception handling in an FDW |
Date: | 2012-01-31 19:42:19 |
Message-ID: | CAEYLb_Uk_TT2QO=n3PHBJP9b4buPGHJKSKZ-81GE3s+1iHhgkg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 31 January 2012 19:01, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> I suggest that you generalise from the example of PLV8. The basic
>> problem is that the effect of longjmp()ing over an area of the stack
>> with a C++ non-POD type is undefined. I don't think you can even use
>> structs, as they have implicit destructors in C++.
> The PODness of a struct depends on its contents.
Right. If I was going to invest much effort in this sort of thing, I
might even write a static assertion that verified a given type's
POD-ness over time, by declaring it within a union...which would
work....unless you were using C++11. Or, just use std::is_pod to build
a static assertion.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-01-31 19:47:19 | Re: Progress on fast path sorting, btree index creation time |
Previous Message | Dean Rasheed | 2012-01-31 19:15:43 | Re: Index-only scan performance regression |