Re: Issues with C++ exception handling in an FDW - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Issues with C++ exception handling in an FDW
Date
Msg-id CAEYLb_Uk_TT2QO=n3PHBJP9b4buPGHJKSKZ-81GE3s+1iHhgkg@mail.gmail.com
Whole thread Raw
In response to Re: Issues with C++ exception handling in an FDW  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 31 January 2012 19:01, Andres Freund <andres@anarazel.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


pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Index-only scan performance regression
Next
From: Robert Haas
Date:
Subject: Re: Progress on fast path sorting, btree index creation time