Re: LIBPQ on Windows and large Queries

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Steve Howe <howe(at)carcass(dot)dhs(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: LIBPQ on Windows and large Queries
Date: 2001-07-27 09:13:54
Message-ID: 3B6130D2.22445BAC@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> "Steve Howe" <howe(at)carcass(dot)dhs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2001-07-27 10:05:59 Re: Slow Performance in PostgreSQL
Previous Message Joerg Hessdoerfer 2001-07-27 08:14:47 Re: LIBPQ on Windows and large Queries