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

RE: [INTERFACES] libpq sockets on win32

From: "Jeff Johnson" <jeff(at)jeffjohnson(dot)net>
To: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, <jeff(at)jeffjohnson(dot)net>
Cc: <pgsql-interfaces(at)postgresql(dot)org>, <pgsql-docs(at)postgresql(dot)org>
Subject: RE: [INTERFACES] libpq sockets on win32
Date: 2001-06-04 19:48:50
Message-ID: B9C9130B5D27D4119D5D00A0C9D3A987109460@SERVER (view raw or flat)
Thread:
Lists: pgsql-docspgsql-interfaces
> 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




Responses

pgsql-docs by date

Next:From: Bruce MomjianDate: 2001-06-04 20:02:00
Subject: Re: [INTERFACES] libpq sockets on win32
Previous:From: Bruce MomjianDate: 2001-06-04 19:32:08
Subject: Re: Update needed for documentation

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2001-06-04 20:02:00
Subject: Re: [INTERFACES] libpq sockets on win32
Previous:From: Bruce MomjianDate: 2001-06-04 19:21:49
Subject: Re: [INTERFACES] libpq sockets on win32

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