Thread: libpq socket problem on Win32

libpq socket problem on Win32

From
"Jeff Johnson"
Date:
I found a problem in libpq.dll when trying to send large SQL
statements to postgres 7.1.x on FreeBSD 4.3 from Windows 2000.  The
same SQL worked fine when sent from FreeBSD.  At first I thought it
was something to do with an 8k limit on text fields but it's just low
level socket code trying to deal with large packets that breaks on
Win32.

It looks like recv on Win32 returns ENOENT instead of EAGAIN for some
reason.  I avoid C as much as possible and low level socket stuff so
this is all new to me.  I hacked libpq\fe-misc.c to handle ENOENT the
same way it handles EAGAIN and everything works now.  I got the clue
from searching deja.com for "ENOENT EAGAIN recv".  The first article
describes a similar problem.

I don't know if my code is the correct fix.  Who should I send it to?

Thanks,
Jeff

> -----Original Message-----
> From: pygresql-admin@vex.net
> [mailto:pygresql-admin@vex.net]On Behalf Of
> Daryl Tester
> Sent: Thursday, May 31, 2001 9:56 AM
> To: pygresql@vex.net
> Subject: Re: [PyGreSQL] limit on size of text fields?
>
>
> Jeff Johnson wrote:
>
> Netscape just crashed and ate my last reply, so this one will
> be brief ...
>
> > Why does the same script run fine when run from FreeBSD also using
> > pygresql?
>
> No idea.
>
> > Postgres claims it
> > has virtually no limits and 8k seems kinda small for a text field
> > limit.
>
> This is on 6.5 - I've no idea what you're running -
>
> dt=> create table test ( t text);
> CREATE
> insert into test values ('xxxxxxxxxxxxxxxxxx'); -- x * 8200
> ERROR:  Tuple is too big: size 8236
> EOF
>
> According to the FAQ on PostgreSQL's website, 7.1 and greater
> supports unlimited row size.  Which version are you running?
>
> Regards,
>   Daryl Tester
>
> _______________________________________________
> PyGreSQL mailing list
> PyGreSQL@vex.net
> http://www.vex.net/mailman/listinfo/pygresql
>