Re: Practical impediment to supporting multiple SSL libraries - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Practical impediment to supporting multiple SSL libraries
Date
Msg-id 87ek01ik26.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Practical impediment to supporting multiple SSL libraries  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Practical impediment to supporting multiple SSL libraries
Re: Practical impediment to supporting multiple SSL libraries
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> On Thu, Apr 13, 2006 at 12:12:25PM +0100, Dave Page wrote:
> > > Ok. I'm not sure what this "double copying" you're referring 
> > > to is, 
> > 
> > The libpq driver copies results out of the PGresult struct into the
> > internal QueryResult classes. With libpq out of the loop, data can go
> > straight from the wire into the QR.
> 
> Hmm, the simplest improvement I can think of is one where you
> register a callback that libpq calls whenever it has received a new
> tuple.

That could be useful for applications but I think a driver really wants to
retain control of the flow of control. To make use of a callback it would have
to have an awkward dance of calling whatever function gives libpq license to
call the callback, having the callback stuff the data in a temporary space,
then checking for new data in the temporary space, and returning it to the
user.



-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Practical impediment to supporting multiple SSL libraries
Next
From: Stephen Frost
Date:
Subject: Re: Practical impediment to supporting multiple SSL libraries