1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +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:
Bruce Momjian
2006-05-21 19:56:41 +00:00
parent 506747337b
commit 583a472f7b
14 changed files with 55 additions and 55 deletions

View File

@@ -33,7 +33,7 @@
#
#
##############################################################################
# $Id: DBMirror.pl,v 1.3.2.2 2002/12/05 21:04:14 momjian Exp $
# $Id: DBMirror.pl,v 1.3.2.3 2006/05/21 19:56:40 momjian Exp $
#
##############################################################################
@@ -412,7 +412,7 @@ sub mirrorInsert($$$$$) {
if(defined $recordValues{$column}) {
my $quotedValue = $recordValues{$column};
$quotedValue =~ s/\\/\\\\/g;
$quotedValue =~ s/'/\\'/g;
$quotedValue =~ s/'/''/g;
$valuesQuery .= "'$quotedValue'";
}
else {
@@ -595,7 +595,7 @@ sub mirrorUpdate($$$$$) {
if(defined $currentValue ) {
$quotedValue = $currentValue;
$quotedValue =~ s/\\/\\\\/g;
$quotedValue =~ s/'/\\'/g;
$quotedValue =~ s/'/''/g;
$updateQuery .= "'$quotedValue'";
}
else {
@@ -617,7 +617,7 @@ sub mirrorUpdate($$$$$) {
if(defined $currentValue) {
$quotedValue = $currentValue;
$quotedValue =~ s/\\/\\\\/g;
$quotedValue =~ s/'/\\'/g;
$quotedValue =~ s/'/''/g;
$updateQuery .= "'$quotedValue'";
}
else {

View File

@@ -1,6 +1,6 @@
/****************************************************************************
* pending.c
* $Id: pending.c,v 1.6.2.5 2003/03/20 03:58:48 momjian Exp $
* $Id: pending.c,v 1.6.2.6 2006/05/21 19:56:40 momjian Exp $
*
* This file contains a trigger for Postgresql-7.x to record changes to tables
* to a pending table for mirroring.
@@ -478,7 +478,7 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc,
}
if (*cpUnFormatedPtr == '\\' || *cpUnFormatedPtr == '\'')
{
*cpFormatedPtr = '\\';
*cpFormatedPtr = *cpUnFormatedPtr;
cpFormatedPtr++;
iUsedDataBlock++;
}