Skip site navigation (1) Skip section navigation (2)

Re: Issues with C++ exception handling in an FDW

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 (view raw or flat)
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

In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2012-01-31 19:47:19
Subject: Re: Progress on fast path sorting, btree index creation time
Previous:From: Dean RasheedDate: 2012-01-31 19:15:43
Subject: Re: Index-only scan performance regression

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group