Re: server-side extension in c++ - Mailing list pgsql-general

From Tom Lane
Subject Re: server-side extension in c++
Date
Msg-id 24114.1275360491@sss.pgh.pa.us
Whole thread Raw
In response to Re: server-side extension in c++  (Bruce Momjian <bruce@momjian.us>)
Responses Re: server-side extension in c++  (Bruce Momjian <bruce@momjian.us>)
Re: server-side extension in c++  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
Bruce Momjian <bruce@momjian.us> writes:
> That is great new information.  I have created a new documentation
> section called "Using C++ for Extensibility", and listed you as the
> author in the CVS commit;  patch attached.  Thanks.

Too bad two out of the four pieces of advice are wrong (how many pieces
of memory managed by the backend are allocated directly with malloc?).
The other two are not wrong as far as they go, but they're certainly
woefully inadequate, because no interesting backend extension is going
to be able to get along without calling back into the core code.

Personally I would reduce this section to

    <para>
     Don't.
    </para>

I don't think it is worth our time to try to support people who run into
the inevitable memory management and error handling incompatibilities.
Nor are they likely to be happy at the end of the experience, if we
blithely tell them up front that it'll work.

            regards, tom lane

pgsql-general by date:

Previous
From: Schwaighofer Clemens
Date:
Subject: Re: What Linux edition we should chose?
Next
From: Bruce Momjian
Date:
Subject: Re: server-side extension in c++