Skip site navigation (1) Skip section navigation (2)

libpq sockets on win32

From: "Jeff Johnson" <jeff(at)jeffjohnson(dot)net>
To: <pgsql-interfaces(at)postgresql(dot)org>, <pgsql-docs(at)postgresql(dot)org>
Subject: libpq sockets on win32
Date: 2001-06-04 16:42:12
Message-ID: B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER (view raw or flat)
Thread:
Lists: pgsql-docspgsql-interfaces
I found that sending more than 16k of data in a SQL statement caused a
problem.  I was using PyGreSQL but narrowed the error down to
"\postgresql-7.1.2\src\interfaces\libpq\fe-misc.c" pqReadData() and
pqFlush().  After some poking around, it looked like recv was setting
errno to ENOENT for some reason.  I figured out why today.  Win32
sockets don't set errno at all.  ENOENT was just left in errno from
some earlier call.

This article describes the problem and work around.
http://msdn.microsoft.com/library/psdk/winsock/ovrvw3_26ia.htm

I haven't done much C coding in a few years and don't want to break
other code by blindly doing:

#define errno WSAGetLastError

Does anyone that knows this code want to take a crack at it?

Thanks,
Jeff


Responses

pgsql-docs by date

Next:From: Bruce MomjianDate: 2001-06-04 17:53:53
Subject: Re: [INTERFACES] libpq sockets on win32
Previous:From: Constantin TeodorescuDate: 2001-06-04 12:39:05
Subject: Re: [INTERFACES] Lots of obsolete docs in pgaccess/lib/help

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2001-06-04 17:53:53
Subject: Re: [INTERFACES] libpq sockets on win32
Previous:From: Constantin TeodorescuDate: 2001-06-04 12:39:05
Subject: Re: [INTERFACES] Lots of obsolete docs in pgaccess/lib/help

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group