summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2006-05-19 02:39:04 +0000
committerBruce Momjian2006-05-19 02:39:04 +0000
commit445ce5f314ba9a373dc4d87c40ba7797d4a89601 (patch)
tree15523b879cc5689be9b6625da98c1d50ab817a80
parent2d97bf1e918a7a3c07c033abd601067f3a259a1b (diff)
Use SQL standard '' rather than \' in /contrib. Backpatch to 8.1.X.
-rwxr-xr-xcontrib/dbmirror/DBMirror.pl6
-rw-r--r--contrib/dbmirror/pending.c2
-rw-r--r--contrib/tsearch2/query.c2
-rw-r--r--contrib/tsearch2/tsvector.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/contrib/dbmirror/DBMirror.pl b/contrib/dbmirror/DBMirror.pl
index d3823fe568..4f9d3e56ea 100755
--- a/contrib/dbmirror/DBMirror.pl
+++ b/contrib/dbmirror/DBMirror.pl
@@ -437,7 +437,7 @@ sub mirrorInsert($$$$$) {
if(defined $recordValues{$column}) {
my $quotedValue = $recordValues{$column};
$quotedValue =~ s/\\/\\\\/g;
- $quotedValue =~ s/'/\\'/g;
+ $quotedValue =~ s/'/''/g;
$valuesQuery .= "'$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 {
@@ -639,7 +639,7 @@ sub mirrorUpdate($$$$$) {
if(defined $currentValue) {
$quotedValue = $currentValue;
$quotedValue =~ s/\\/\\\\/g;
- $quotedValue =~ s/'/\\'/g;
+ $quotedValue =~ s/'/''/g;
$updateQuery .= "'$quotedValue'";
}
else {
diff --git a/contrib/dbmirror/pending.c b/contrib/dbmirror/pending.c
index 753dec19ed..06b4c80a03 100644
--- a/contrib/dbmirror/pending.c
+++ b/contrib/dbmirror/pending.c
@@ -541,7 +541,7 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc, Oid tableOid,
}
if (*cpUnFormatedPtr == '\\' || *cpUnFormatedPtr == '\'')
{
- *cpFormatedPtr = '\\';
+ *cpFormatedPtr = *cpUnFormatedPtr;
cpFormatedPtr++;
iUsedDataBlock++;
}
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c
index 9be5f451fa..8ed66460ba 100644
--- a/contrib/tsearch2/query.c
+++ b/contrib/tsearch2/query.c
@@ -748,7 +748,7 @@ infix(INFIX * in, bool first)
{
if ( t_iseq(op, '\'') )
{
- *(in->cur) = '\\';
+ *(in->cur) = '\'';
in->cur++;
}
COPYCHAR(in->cur,op);
diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c
index 0f369bdcb7..d274f01256 100644
--- a/contrib/tsearch2/tsvector.c
+++ b/contrib/tsearch2/tsvector.c
@@ -529,7 +529,7 @@ tsvector_out(PG_FUNCTION_ARGS)
outbuf = (char *) repalloc((void *) outbuf, ++lenbuf);
curout = outbuf + pos;
- *curout++ = '\\';
+ *curout++ = '\'';
}
while(len--)
*curout++ = *curin++;