pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Johnson <jeff@jeffjohnson.net>
To: pgsql-interfaces@postgresql.org
To: pgsql-docs@postgresql.org
Subject: libpq sockets on win32
Date: Mon, 4 Jun 2001 12:42:12 -0400
Message-ID: <B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER> (raw)
In-Reply-To: <B9C9130B5D27D4119D5D00A0C9D3A987193157@SERVER>

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




view thread (14+ messages)  latest in thread

Message-ID: <B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER>
Permalink:  ../B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER/
Also on:    postgresql.org/message-id/B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-docs@postgresql.org
  Cc: jeff@jeffjohnson.net, pgsql-interfaces@postgresql.org
  Subject: Re: libpq sockets on win32
  In-Reply-To: <B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER>
  References: <B9C9130B5D27D4119D5D00A0C9D3A987193157@SERVER> <B9C9130B5D27D4119D5D00A0C9D3A98710945B@SERVER>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox