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 during transmission. 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 <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy
signature.asc
Description: Digital signature