[libdbd-pg-perl] 13/35: call PGflush in COPY_BOTH mode
Christoph Berg
myon at debian.org
Wed Sep 27 17:41:03 UTC 2017
This is an automated email from the git hooks/post-receive script.
myon pushed a commit to branch master
in repository libdbd-pg-perl.
commit 85d195d83eaa3c8f868bbaecdb18ad1765d845cb
Author: William Cox <mydimension at gmail.com>
Date: Wed Sep 20 13:57:12 2017 -0400
call PGflush in COPY_BOTH mode
probably not the best way to write this in, but it was the least
invasive to my eye.
---
dbdimp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dbdimp.c b/dbdimp.c
index 57660d4..86f2b55 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -4247,6 +4247,12 @@ int pg_db_putcopydata (SV * dbh, SV * dataline)
copystatus = PQputCopyData(imp_dbh->conn, copydata, copylen);
if (1 == copystatus) {
+ if (PGRES_COPY_BOTH == imp_dbh->copystate && PQflush(imp_dbh->conn)) {
+ _fatal_sqlstate(aTHX_ imp_dbh);
+
+ TRACE_PQERRORMESSAGE;
+ pg_error(aTHX_ dbh, PGRES_FATAL_ERROR, PQerrorMessage(imp_dbh->conn));
+ }
}
else if (0 == copystatus) { /* non-blocking mode only */
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdbd-pg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list