diff options
| author | Michael Meskes <meskes@postgresql.org> | 2010-10-14 17:49:01 +0200 |
|---|---|---|
| committer | Michael Meskes <meskes@postgresql.org> | 2010-10-14 17:49:01 +0200 |
| commit | 86d4cc4a2acedeacdaa3535113cb90dabbd752ea (patch) | |
| tree | 31e542d05a97097f610b934746424734b97468a1 /src | |
| parent | ef76230c2719ab2f8809bc0d94389ebe41a6a249 (diff) | |
Applied patch by Itagaki Takahiro to fix incorrect status calculation in
ecpglib. Instead of parsing the statement just as ask the database server.
Diffstat (limited to 'src')
| -rw-r--r-- | src/interfaces/ecpg/ecpglib/misc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 9a5dca763bd..5c1696ad828 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -219,10 +219,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction) return FALSE; PQclear(res); - if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 0) - con->committed = true; - else - con->committed = false; + con->committed = (PQtransactionStatus(con->connection) == PQTRANS_IDLE); } return true; |
