From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, 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 01:23:07 |
Message-ID: | 201006020123.o521N7V01815@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> > On 01/06/10 11:05, Tom Lane wrote:
> >> I'd be interested to see a section like this written by someone who'd
> >> actually done a nontrivial C++ extension and lived to tell the tale.
>
> > I can't speak up there - my own C++/Pg backend stuff has been fairly
> > trivial, and has been where I can maintain a fairly clean separation of
> > the C++-exposed and the Pg-backend-exposed parts. I was able to keep
> > things separate enough that my C++ compilation units didn't include the
> > Pg backend headers; they just exposed a pure C public interface. The Pg
> > backend-using compilation units were written in C, and talked to the C++
> > part over its exposed pure C interfaces.
>
> Yeah, if you can design your code so that C++ never has to call back
> into the core backend, that eliminates a large chunk of the pain.
> Should we be documenting design ideas like this one?
I have incorporated the new ideas into the C++ documentation section,
and removed the comment block in the attached patch.
--
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 | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2010-06-02 01:31:42 | Re: Disable executing external commands from psql? |
Previous Message | Ernesto Quiñones | 2010-06-02 00:39:12 | Re: PosttgreSQL on AIX |