Re: server-side extension in c++

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Igor <igor(at)carcass(dot)ath(dot)cx>, pgsql-general(at)postgresql(dot)org
Subject: Re: server-side extension in c++
Date: 2010-06-02 18:29:50
Message-ID: 201006021829.o52IToF25392@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Geoghegan wrote:
> >> I would have
> >> imagined that ultimately, the call to the Pg C function must return,
> >> and therefore cannot affect stack unwinding within the C++ part of the
> >> program.
> >
> > That's the whole point; a longjmp breaks the call chain, and the
> > guarantee that eventually the stack will unwind as functions return.
>
> Yes, but my point was that if that occurs above the C++ code, it will
> never be affected by it. We have to longjmp() *over* C++ code before
> we have a problem. However, Bruce has answered the question of whether
> or not that happens - it does, so I guess it doesn't matter.

Yes. I have updated the C++ doc patch to call it a "distant"
longjump().

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

Attachment Content-Type Size
/pgpatches/cpp text/x-diff 4.2 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2010-06-02 18:40:46 Re: postgres authentication against Windows Domain
Previous Message Manohar Bhattarai 2010-06-02 18:23:57 Exception while accessing database