mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
It seems the regression tests don't cover copy in/out at all, so
code that I had assumed was working had not been tested. Naturally, it was broken ... Tom Lane
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.11 1998/05/06 23:51:14 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.12 1998/05/06 23:53:48 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -342,6 +342,15 @@ tryAgain:
|
||||
{
|
||||
if (errno == EINTR)
|
||||
goto tryAgain;
|
||||
/* Some systems return EAGAIN/EWOULDBLOCK for no data */
|
||||
#ifdef EAGAIN
|
||||
if (errno == EAGAIN)
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
|
||||
if (errno == EWOULDBLOCK)
|
||||
return 0;
|
||||
#endif
|
||||
sprintf(conn->errorMessage,
|
||||
"pqReadData() -- read() failed: errno=%d\n%s\n",
|
||||
errno, strerror(errno));
|
||||
@ -374,6 +383,15 @@ tryAgain2:
|
||||
{
|
||||
if (errno == EINTR)
|
||||
goto tryAgain2;
|
||||
/* Some systems return EAGAIN/EWOULDBLOCK for no data */
|
||||
#ifdef EAGAIN
|
||||
if (errno == EAGAIN)
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
|
||||
if (errno == EWOULDBLOCK)
|
||||
return 0;
|
||||
#endif
|
||||
sprintf(conn->errorMessage,
|
||||
"pqReadData() -- read() failed: errno=%d\n%s\n",
|
||||
errno, strerror(errno));
|
||||
|
Reference in New Issue
Block a user