From: Michael Meskes Date: Sat, 1 Nov 2008 19:53:35 +0000 (+0000) Subject: Move from strcmp to strncmp to be more tolerant for changes to the parser. X-Git-Tag: recoveryinfrav9~440 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=1895946c4601707ebea504e4a2f70c21a7da9425;p=users%2Fsimon%2Fpostgres.git Move from strcmp to strncmp to be more tolerant for changes to the parser. --- diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index e8e80582b7..d48cb9e957 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -204,7 +204,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction) PQclear(res); } - if (strcmp(transaction, "commit") == 0 || strcmp(transaction, "rollback") == 0) + if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 0) con->committed = true; else con->committed = false;