From: Jeff Johnson <jeff@jeffjohnson.net>
To: 'Bruce Momjian' <pgman@candle.pha.pa.us>
To: jeff@jeffjohnson.net
Cc: pgsql-interfaces@postgresql.org
Cc: pgsql-docs@postgresql.org
Subject: RE: [INTERFACES] libpq sockets on win32
Date: Mon, 4 Jun 2001 15:48:50 -0400
Message-ID: <B9C9130B5D27D4119D5D00A0C9D3A987109460@SERVER> (raw)
In-Reply-To: <B9C9130B5D27D4119D5D00A0C9D3A987193185@SERVER>
> I have done exactly that. I assume fcntl(), ioctl(),
> select() use errno
> even if used on a socket, while getsockopt(), setsockopt(),
socket(),
> connect(), getsockname(), send(), recv() use WSAGetLastError. Is
this
> list correct?
I don't know enough about such things.
>
> The patch is attached. Please let me know so I can finalize it and
> apply it.
Couple of changes required to compile on Win32:
Change:
#define sockerrno WSAGetLastError
To:
#define sockerrno WSAGetLastError()
This has to go back into fe-connect.c, EINPROGRESS isn't defined in
Win32 for some reason..
#ifndef WIN32
if (errno == EINPROGRESS || errno == 0)
#else
if (WSAGetLastError() == WSAEINPROGRESS)
#endif
I tested it out but I'm getting this error when sending a large SQL
statement (>16k).
File "WebKit\Application.py", line 340, in dispatchRequest
self.handleGoodURL(transaction)
File "WebKit\Application.py", line 457, in handleGoodURL
self.respond(transaction)
File "WebKit\Application.py", line 569, in respond
transaction.respond()
File "H:\webware\Webware\WebKit\Transaction.py", line 93, in respond
self._servlet.respond(self)
File "H:\webware\Webware\WebKit\HTTPServlet.py", line 38, in respond
method(self, trans)
File "H:\webware\Webware\WebKit\Page.py", line 34, in respondToGet
self._respond(transaction)
File "H:\webware\Webware\WebKit\Page.py", line 67, in _respond
self.writeHTML()
File "H:\webware\Webware\WebKit\Page.py", line 129, in writeHTML
self.writeBody()
File "H:\webware\Webware\WebKit\Page.py", line 186, in writeBody
self.writeBodyParts()
File "/EA\www\SitePage.py", line 305, in writeBodyParts
self.writeContent()
File "\EA\www\MyTest.py", line 9, in writeContent
self.transferRecords()
File "\EA\www\MyTest.py", line 45, in transferRecords
cu.execute(sql)
File "c:\python20\pgdb.py", line 189, in execute
self.executemany(operation, (params,))
File "c:\python20\pgdb.py", line 204, in executemany
rows = self.__source.execute(sql)
ValueError: pqReadData() -- read() failed: errno=10035
Unknown error
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, pgman@candle.pha.pa.us, pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] libpq sockets on win32
In-Reply-To: <B9C9130B5D27D4119D5D00A0C9D3A987109460@SERVER>
References: <B9C9130B5D27D4119D5D00A0C9D3A987193185@SERVER> <B9C9130B5D27D4119D5D00A0C9D3A987109460@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