mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Change \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4,
and 8.0. Later releases already patched.
This commit is contained in:
@@ -84,7 +84,7 @@ exec sql end declare section;
|
||||
exec sql execute immediate :command;
|
||||
printf("New tuple got OID = %ld\n", sqlca.sqlerrd[1]);
|
||||
|
||||
sprintf(command, "insert into \"Test\" (name, amount, letter) values ('db: \\\'mm\\\'', 2, 't')");
|
||||
sprintf(command, "insert into \"Test\" (name, amount, letter) values ('db: ''mm''', 2, 't')");
|
||||
exec sql execute immediate :command;
|
||||
|
||||
strcpy(msg, "execute insert 2");
|
||||
|
@@ -26,7 +26,7 @@ import java.sql.Timestamp;
|
||||
import java.sql.Types;
|
||||
import java.util.Vector;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.41.2.8 2004/10/21 19:13:55 jurka Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.41.2.9 2006/05/21 19:57:07 momjian Exp $
|
||||
* This class defines methods of the jdbc1 specification. This class is
|
||||
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
|
||||
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
|
||||
@@ -1145,7 +1145,7 @@ public abstract class AbstractJdbc1Statement implements BaseStatement
|
||||
{
|
||||
case '\\':
|
||||
case '\'':
|
||||
p_output.append('\\');
|
||||
p_output.append(c);
|
||||
p_output.append(c);
|
||||
break;
|
||||
case '\0':
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.153.2.4 2004/03/14 22:01:01 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.153.2.5 2006/05/21 19:57:07 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2329,7 +2329,7 @@ PQescapeBytea(const unsigned char *bintext, size_t binlen, size_t *bytealen)
|
||||
}
|
||||
else if (*vp == '\'')
|
||||
{
|
||||
rp[0] = '\\';
|
||||
rp[0] = '\'';
|
||||
rp[1] = '\'';
|
||||
rp += 2;
|
||||
}
|
||||
|
Reference in New Issue
Block a user