diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java index bf412571115..9df669910da 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java @@ -1396,7 +1396,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu if (s != null) { int c = s.charAt(0); - return ((c == 't') || (c == 'T')); + return ((c == 't') || (c == 'T') || (c == '1')); } return false; // SQL NULL } diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index bdff56fe080..e7495dabf7f 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.110 2001/09/07 22:02:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.111 2001/09/13 17:00:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ static int getNotice(PGconn *conn); /* --------------- * Escaping arbitrary strings to get valid SQL strings/identifiers. * - * Replaces "\\" with "\\\\", "\0" with "\\0", and "'" with "''". + * Replaces "\\" with "\\\\" and "'" with "''". * length is the length of the buffer pointed to by * from. The buffer at to must be at least 2*length + 1 characters * long. A terminating NUL character is written. @@ -75,13 +75,6 @@ PQescapeString (char *to, const char *from, size_t length) while (remaining > 0) { switch (*source) { - case '\0': - *target = '\\'; - target++; - *target = '0'; - /* target and remaining are updated below. */ - break; - case '\\': *target = '\\'; target++;