Tom Lane wrote:
>
> "Steve Howe" <howe@carcass.dhs.org> writes:
> > Is anybody trying to solve the 8191 bytes query limit from libpq
> > windows port ???
>
> FWIW, if the problem is real (which I still misdoubt),
Yes it's real.
Error handling seems the cause. When "Error: pqReadData() --
read() failed: errno=0 No error" occurs WSAGetLastError()
returns WSAEWOULDBLOCK. If EWOULDBLOCK exists and errno ==
EWOULDBLOCK, pqReadData() returns 0 or 1 not -1.
I added the code errno = WSAGetLastError(); and
#define EWOULDBLOCK WSAEWOULDBLOCK.
After that I encountered another error "pqFlush() --
couldn't send data: errno=0". Then WSAGetLastError() also
returns WSAEWOULDBLOCK. After adding *errno = WSAGetLastError();*
the insertion was successful.
regards,
Hiroshi Inoue