From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | Kurt Harriman <harriman(at)acm(dot)org> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Mostly Harmless: Welcoming our C++ friends |
Date: | 2008-12-05 11:31:05 |
Message-ID: | 87prk6x3ie.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kurt Harriman <harriman(at)acm(dot)org> writes:
> Hi Peter,
>
>> Have you considered writing a procedural language plugin for C++?
>
> C++ can masquerade as C, so I don't think it needs a separate
> plugin. Just tell PostgreSQL that your user-defined function
> is C even though you secretly know it is C++.
Well one thing that might be useful for a c++ procedural language would be
catching C++ exceptions and translating them into ereports which could then be
caught in Postgres.
That's actually what I thought you had done but I just reread your mail and
realized you only handled unhandled exceptions which cause the backend to die.
The other way around could be useful too -- catching ereports/elogs within a
backend API call from C++ code and throwing a C++ exception. I'm not sure if
that's doable though.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2008-12-05 11:42:05 | Re: Can't start postmaster on -HEAD |
Previous Message | Kurt Harriman | 2008-12-05 11:17:26 | Re: Mostly Harmless: Welcoming our C++ friends |