From eddbb27048c05d3a719acb71534b95d70d85706c Mon Sep 17 00:00:00 2001 From: randomdan Date: Wed, 30 Mar 2011 18:56:11 +0000 Subject: Allow PQ_TUPLES_OK as an ok reply for modify commands (for cases when a function was called using SELECT func(...)) --- libpqpp/modifycommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpqpp/modifycommand.cpp') diff --git a/libpqpp/modifycommand.cpp b/libpqpp/modifycommand.cpp index 69cd8cc..b9ece01 100644 --- a/libpqpp/modifycommand.cpp +++ b/libpqpp/modifycommand.cpp @@ -48,7 +48,7 @@ PQ::ModifyCommand::execute(bool anc) { prepare(); PGresult * res = PQexecPrepared(c->conn, stmntName.c_str(), values.size(), &values.front(), &lengths.front(), &formats.front(), 0); - c->checkResult(res, PGRES_COMMAND_OK); + c->checkResult(res, PGRES_COMMAND_OK, PGRES_TUPLES_OK); unsigned int rows = atoi(PQcmdTuples(res)); PQclear(res); if (rows == 0 && !anc) { -- cgit v1.2.3