Re: Maintaining state across function calls - Mailing list pgsql-general

From Peter Geoghegan
Subject Re: Maintaining state across function calls
Date
Msg-id CAEYLb_VSWw80ZmiN407Uqh2UX-fbnLvQQzSAn2d0bDK-r19oRw@mail.gmail.com
Whole thread Raw
In response to Re: Maintaining state across function calls  (Craig Ringer <craig@2ndQuadrant.com>)
List pgsql-general
On 20 November 2012 01:30, Craig Ringer <craig@2ndquadrant.com> wrote:
> Otherwise you'll have to translate error handling mechanisms at every
> boundary between C++ and Pg code, something I'm not even certain is
> possible to do reliably.

I think it's probably the case that PLV8 is the most mature example of
wrapping a C++ library that is liable to throw C++ exceptions within
Postgres backend code, in a sane way (that is, avoiding unwinding the
stack via longjmp() over a part of the stack where a destructor needs
to be called, which is undefined in C++).

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Maintaining state across function calls
Next
From: "Welty, Richard"
Date:
Subject: Re: Experiences with pl/Java