Re: Maintaining state across function calls

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: matt(at)byrney(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Maintaining state across function calls
Date: 2012-11-20 01:57:57
Message-ID: CAEYLb_VSWw80ZmiN407Uqh2UX-fbnLvQQzSAn2d0bDK-r19oRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 20 November 2012 01:30, Craig Ringer <craig(at)2ndquadrant(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Welty, Richard 2012-11-20 04:05:02 Re: Experiences with pl/Java
Previous Message Craig Ringer 2012-11-20 01:30:23 Re: Maintaining state across function calls