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

Re: libpq sockets on win32

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: jeff(at)jeffjohnson(dot)net
Cc: pgsql-interfaces(at)postgresql(dot)org, pgsql-docs(at)postgresql(dot)org
Subject: Re: libpq sockets on win32
Date: 2001-06-10 02:55:46
Message-ID: 200106100255.f5A2tkc21924@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-docspgsql-interfaces
I have added this thread to TODO.detail/libpq.

> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-docs by date

Next:From: Bruce MomjianDate: 2001-06-10 03:47:13
Subject: Re: Update needed for documentation
Previous:From: Vince VielhaberDate: 2001-06-08 15:01:23
Subject: Re: Developer's Bios

pgsql-interfaces by date

Next:From: Alex PilosovDate: 2001-06-10 19:59:45
Subject: [PATCH] notify support for DBD::Pg
Previous:From: Bruce MomjianDate: 2001-06-10 02:48:38
Subject: Re: [DOCS] Re: libpq sockets on win32

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