Hello all,

        Is anybody trying to solve the 8191 bytes query limit from libpq
windows port ???
        We've discussed this topic on "Large queries - again" thread and it
seems like nobody got interested on fixing it.
        All Windows applications that rely on libpq are broken because of
this issue (ODBC applications are fine btw).
        I can also do any kind of testing under Windows (and actually I'll
do it anyway). I wonder if this limitation also applies to the unix libpq
library ???
        Jan, Tom, Bruce - any news on this ?

Best Regards,
Steve Howe



Thu, 26 Jul 2001 01:24:42 -0300
"Steve Howe" <howe@carcass.dhs.org>
LIBPQ on Windows and large Queries
"Steve Howe" <howe@carcass.dhs.org> writes:
>         Is anybody trying to solve the 8191 bytes query limit from libpq
> windows port ???

I think it's *your* responsibility, at least to identify what's going
on.  This is an open source project, and that means you can and should
fix problems that affect you.

FWIW, if the problem is real (which I still misdoubt), it seems like
it would have to be related to needing to flush multiple output
bufferloads during a single PQsendQuery.  This works just fine on
everything but Windows --- why would it fail there?  And why would
no one but you have complained of it before?  I have no ideas.

			regards, tom lane

Fri, 27 Jul 2001 01:36:09 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: LIBPQ on Windows and large Queries 
At 01:36 27.07.2001 -0400, you wrote:
>"Steve Howe" <howe@carcass.dhs.org> writes:
> >         Is anybody trying to solve the 8191 bytes query limit from libpq
> > windows port ???
>
>I think it's *your* responsibility, at least to identify what's going
>on.  This is an open source project, and that means you can and should
>fix problems that affect you.
>
>FWIW, if the problem is real (which I still misdoubt), it seems like
>it would have to be related to needing to flush multiple output
>bufferloads during a single PQsendQuery.  This works just fine on
>everything but Windows --- why would it fail there?  And why would
>no one but you have complained of it before?  I have no ideas.

[...]

To go on about this, I use psql 7.1.2 for toying around on Win2K, and have not
had this problem. I just evaluated using TOASTED blobs (written in a text 
column
as base64 encoded).

I did use the cygwin libpq though. Probably I'll get around compiling 
native libpq
and try that with my test cases.

Greetings,
         Joerg


Fri, 27 Jul 2001 10:14:47 +0200
Joerg Hessdoerfer <Joerg.Hessdoerfer@sea-gmbh.com>
Re: LIBPQ on Windows and large Queries 
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

Fri, 27 Jul 2001 18:13:54 +0900
Hiroshi Inoue <Inoue@tpf.co.jp>
Re: LIBPQ on Windows and large Queries
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Yes it's real.
> Error handling seems the cause.

Hmm, are you working with CVS tip or 7.1.* sources?  I'm wondering
how this interacts with the recent patch to #define errno as
WSAGetLastError() on WIN32...

			regards, tom lane

Sun, 29 Jul 2001 16:05:49 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: LIBPQ on Windows and large Queries 
Tom Lane wrote:
> 
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Yes it's real.
> > Error handling seems the cause.
> 
> Hmm, are you working with CVS tip or 7.1.* sources?  I'm wondering
> how this interacts with the recent patch to #define errno as
> WSAGetLastError() on WIN32...
> 

Oops sorry, I could have no cvs access for 3 weeks.
Well haven't this problem solved already ?

regards,
Hiroshi Inoue

Mon, 30 Jul 2001 08:55:35 +0900
Hiroshi Inoue <Inoue@tpf.co.jp>
Re: LIBPQ on Windows and large Queries
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Well haven't this problem solved already ?

I'm not sure.  Steve, have you tried current sources?

			regards, tom lane

Sun, 29 Jul 2001 19:57:21 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: LIBPQ on Windows and large Queries 
Hello all,

        I was in a trip and just arrived, and will do it real soon.


Best Regards,
Steve Howe

----- Original Message ----- 
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
Cc: "Steve Howe" <howe@carcass.dhs.org>; <pgsql-hackers@postgresql.org>
Sent: Sunday, July 29, 2001 8:57 PM
Subject: Re: [HACKERS] LIBPQ on Windows and large Queries 


> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Well haven't this problem solved already ?
> 
> I'm not sure.  Steve, have you tried current sources?
> 
> regards, tom lane
> 


Wed, 1 Aug 2001 02:20:23 -0300
"Steve Howe" <howe@carcass.dhs.org>
Re: LIBPQ on Windows and large Queries 