On Thu, Feb 28, 2008 at 01:57:49AM +0000, Simon Riggs wrote:
> > AIUI the server merely streams the rows to you, the client doesn't get
> > to say how many :)
> Right, but presumably we generate a new message per PQgetCopyData()
> request? So my presumption is we need to wait for that to be generated
> each time?
No, PQgetCopyData() doesn't send anything. It merely reads what's in
the kernel socket buffer to a local buffer and when it has a complete
line it mallocs a string and returns it to you.
Similarly, PQputCopyData() doesn't expect anything from the server
That's why I was wondering about the rows per packet. Sending bigger
packets reduces overall overhead.
(The malloc/free per row doesn't seem too efficient.)
Have a nice day,
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy
In response to
pgsql-hackers by date
|Next:||From: Josh Berkus||Date: 2008-02-28 16:58:01|
|Subject: Re: UUID data format 4x-4x-4x-4x-4x-4x-4x-4x|
|Previous:||From: Andrew Dunstan||Date: 2008-02-28 14:21:04|
|Subject: Re: Silly Newbie question|