diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-05-25 19:09:55 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-05-25 19:09:55 +0000 |
commit | 61f5e13c4368bf9ea0a30f7463b4a8e36fe66de1 (patch) | |
tree | f825ac2e7ef112c5e2a2d1724e070c49456e2071 | |
parent | 936b27fa870ba727e98d443297aebca869813934 (diff) | |
download | postgresql-61f5e13c4368bf9ea0a30f7463b4a8e36fe66de1.tar.gz postgresql-61f5e13c4368bf9ea0a30f7463b4a8e36fe66de1.zip |
! * Users doing non-blocking connections need to handle the reset
! * themselves, they'll need to check the connection status if we
! * return an error.
Alfred Perlstein
-rw-r--r-- | src/interfaces/libpq/fe-exec.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 6617bb2bc30..b90159af4dd 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.94 2000/04/12 17:17:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.95 2000/05/25 19:09:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1587,7 +1587,15 @@ PQendcopy(PGconn *conn) DONOTICE(conn, "PQendcopy: resetting connection\n"); - PQreset(conn); + /* + * Users doing non-blocking connections need to handle the reset + * themselves, they'll need to check the connection status if we + * return an error. + */ + if (pqIsnonblocking(conn)) + PQresetStart(conn); + else + PQreset(conn); return 1; } |