diff --git a/dbdimp.c b/dbdimp.c index 58e23161..7e572382 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -5318,6 +5318,9 @@ long pg_db_result (SV *h, imp_dbh_t *imp_dbh) TRACE_PQCLEAR; PQclear(result); } + if ( rows == -1 ) { + break; + } } if (NULL != imp_dbh->async_sth) {