? Release ? savepoint_patch ? widetypes.diff ? installer/Thumbs.db ? installer/psqlodbc.msi ? installer/psqlodbc.msm ? installer/psqlodbc.wixobj ? installer/psqlodbcm.wixobj Index: connection.c =================================================================== RCS file: /cvsroot/psqlodbc/psqlodbc/connection.c,v retrieving revision 1.109 diff -u -r1.109 connection.c --- connection.c 1 Sep 2005 14:45:16 -0000 1.109 +++ connection.c 2 Sep 2005 08:09:37 -0000 @@ -1822,7 +1822,14 @@ else if (strnicmp(cmdbuffer, "COMMIT", 6) == 0) CC_on_commit(self); else if (strnicmp(cmdbuffer, "ROLLBACK", 8) == 0) + { + /* + The method of ROLLBACK an original form .... + ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] savepoint_name + */ + if (PG_VERSION_LT(self, 8.0) || !(contains_token(query, " TO "))) CC_on_abort(self, NO_TRANS); + } else if (strnicmp(cmdbuffer, "END", 3) == 0) CC_on_commit(self); else if (strnicmp(cmdbuffer, "ABORT", 5) == 0) @@ -3195,7 +3202,14 @@ else if (strnicmp(cmdbuffer, "COMMIT", 6) == 0) CC_on_commit(self); else if (strnicmp(cmdbuffer, "ROLLBACK", 8) == 0) + { + /* + The method of ROLLBACK an original form .... + ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] savepoint_name + */ + if (PG_VERSION_LT(self, 8.0) || !(contains_token(query, " TO "))) CC_on_abort(self, NO_TRANS); + } else if (strnicmp(cmdbuffer, "END", 3) == 0) CC_on_commit(self); else if (strnicmp(cmdbuffer, "ABORT", 5) == 0) Index: misc.c =================================================================== RCS file: /cvsroot/psqlodbc/psqlodbc/misc.c,v retrieving revision 1.41 diff -u -r1.41 misc.c --- misc.c 13 Jul 2005 14:23:35 -0000 1.41 +++ misc.c 2 Sep 2005 08:04:24 -0000 @@ -447,3 +447,20 @@ } return my_strcat1(buf, fmt, s1, s, len); } + +int +contains_token(char *data, char *token) +{ + int i, tlen, dlen; + + dlen = strlen(data); + tlen = strlen(token); + + for (i = 0; i < dlen-tlen+1; i++) + { + if (!strnicmp((const char *)data+i, token, tlen)) + return 1; + } + + return 0; +} Index: misc.h =================================================================== RCS file: /cvsroot/psqlodbc/psqlodbc/misc.h,v retrieving revision 1.40 diff -u -r1.40 misc.h --- misc.h 9 Jul 2004 18:50:51 -0000 1.40 +++ misc.h 2 Sep 2005 08:03:29 -0000 @@ -116,16 +116,16 @@ #endif -void remove_newlines(char *string); -char *strncpy_null(char *dst, const char *src, int len); -char *trim(char *string); -char *make_string(const char *s, int len, char *buf, size_t bufsize); -char *make_lstring_ifneeded(ConnectionClass *, const char *s, int len, BOOL); -char *my_strcat(char *buf, const char *fmt, const char *s, int len); -char *schema_strcat(char *buf, const char *fmt, const char *s, int len, +void remove_newlines(char *string); +char *strncpy_null(char *dst, const char *src, int len); +char *trim(char *string); +char *make_string(const char *s, int len, char *buf, size_t bufsize); +char *make_lstring_ifneeded(ConnectionClass *, const char *s, int len, BOOL); +char *my_strcat(char *buf, const char *fmt, const char *s, int len); +char *schema_strcat(char *buf, const char *fmt, const char *s, int len, const char *, int, ConnectionClass *conn); -char *my_strcat1(char *buf, const char *fmt, const char *s1, const char *s, int len); -char *schema_strcat1(char *buf, const char *fmt, const char *s1, +char *my_strcat1(char *buf, const char *fmt, const char *s1, const char *s, int len); +char *schema_strcat1(char *buf, const char *fmt, const char *s1, const char *s, int len, const char *, int, ConnectionClass *conn); /* #define GET_SCHEMA_NAME(nspname) (stricmp(nspname, "public") ? nspname : "") */ @@ -137,9 +137,10 @@ #define STRCPY_TRUNCATED (-1) #define STRCPY_NULL (-2) -int my_strcpy(char *dst, int dst_len, const char *src, int src_len); - -/* Define a type for defining a constant string expression */ -#define CSTR static const char * const +int my_strcpy(char *dst, int dst_len, const char *src, int src_len); +int contains_token(char *data, char *token); + +/* Define a type for defining a constant string expression */ +#define CSTR static const char * const #endif