Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f55JaXE63397 for ; Tue, 5 Jun 2001 15:36:33 -0400 (EDT) (envelope-from pgsql-docs-owner@postgresql.org) Received: from jeffjohnson.net (colo16.traci.net [216.242.235.49] (may be forged)) by postgresql.org (8.11.3/8.11.1) with ESMTP id f54GmKE15602; Mon, 4 Jun 2001 12:48:20 -0400 (EDT) (envelope-from jeff@jeffjohnson.net) Received: from ffsdev01 [64.135.29.202] by jeffjohnson.net with ESMTP (SMTPD32-6.05) id AB6E6070068; Mon, 04 Jun 2001 12:46:38 -0400 Reply-To: From: "Jeff Johnson" To: , Subject: libpq sockets on win32 Date: Mon, 4 Jun 2001 12:42:12 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal X-Archive-Number: 200106/9 X-Sequence-Number: 804 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