Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f54HrwE44658; Mon, 4 Jun 2001 13:53:58 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f54HrrU27542; Mon, 4 Jun 2001 13:53:53 -0400 (EDT) From: Bruce Momjian Message-Id: <200106041753.f54HrrU27542@candle.pha.pa.us> Subject: Re: [INTERFACES] libpq sockets on win32 In-Reply-To: "from Jeff Johnson at Jun 4, 2001 12:42:12 pm" To: jeff@jeffjohnson.net Date: Mon, 4 Jun 2001 13:53:53 -0400 (EDT) CC: pgsql-interfaces@postgresql.org, pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200106/1 X-Sequence-Number: 796 > 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 can't read that web site under Netscape. > 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 If I could read it, I think I could fix it. Please send it in some readable format. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026