Michael Meskes <meskes@postgresql.org> writes:
> On Mon, Sep 04, 2006 at 12:06:02AM -0400, Tom Lane wrote:
>> The backend utils/adt/ code gets to rely on the backend's
>> error handling and memory management protocols, which I surely do
>> not propose to remove, but how could we keep common sources when
>> ecpglib has to work in a far less friendly environment?
> We could modify the backend code to use pgtypeslib, but that would cost
> at least a little bit of performance I would guess.
I'd prefer to go in the other direction: provide enough infrastructure
in ecpglib that it can use the unmodified backend sources. It would
probably not take too much code to provide minimal elog and palloc
support ... the question is what else would we need?
(BTW, if anyone is working on making that pie-in-the-sky TODO list,
here's a pet peeve for it: ecpg's bison parser should be auto-generated
from the backend's, instead of derived manually.)
regards, tom lane