--- sql/pgsql/parser3pgsql.C 2003/07/23 13:21:12 1.12.6.2 +++ sql/pgsql/parser3pgsql.C 2003/09/26 15:36:03 1.13.4.1 @@ -7,7 +7,7 @@ 2001.07.30 using PgSQL 7.1.2 */ -static const char *RCSId="$Id: parser3pgsql.C,v 1.12.6.2 2003/07/23 13:21:12 paf Exp $"; +static const char *RCSId="$Id: parser3pgsql.C,v 1.13.4.1 2003/09/26 15:36:03 paf Exp $"; #include "config_includes.h" @@ -183,10 +183,10 @@ public: while(length--) { switch(*from) { case '\'': // "'" -> "''" - *to++='\''; result++; + *to++='\''; break; case '\\': // "\" -> "\\" - *to++='\\'; result++; + *to++='\\'; break; } *to++=*from++; @@ -276,6 +276,7 @@ public: str=(char*)services.malloc(size+1); if(!lo_read_ex(conn, fd, str, size_tell)) PQclear_throw("lo_read can not read all bytes of object"); + str[size]=0; } else str=0; if(lo_close(conn, fd)<0)