#
#
##############################################################################
-# $PostgreSQL: pgsql/contrib/dbmirror/DBMirror.pl,v 1.10 2004/07/02 00:58:09 joe Exp $
+# $PostgreSQL: pgsql/contrib/dbmirror/DBMirror.pl,v 1.10.6.1 2006/05/19 02:39:04 momjian Exp $
#
##############################################################################
if(defined $recordValues{$column}) {
my $quotedValue = $recordValues{$column};
$quotedValue =~ s/\\/\\\\/g;
- $quotedValue =~ s/'/\\'/g;
+ $quotedValue =~ s/'/''/g;
$valuesQuery .= "'$quotedValue'";
}
else {
if(defined $currentValue ) {
$quotedValue = $currentValue;
$quotedValue =~ s/\\/\\\\/g;
- $quotedValue =~ s/'/\\'/g;
+ $quotedValue =~ s/'/''/g;
$updateQuery .= "'$quotedValue'";
}
else {
if(defined $currentValue) {
$quotedValue = $currentValue;
$quotedValue =~ s/\\/\\\\/g;
- $quotedValue =~ s/'/\\'/g;
+ $quotedValue =~ s/'/''/g;
$updateQuery .= "'$quotedValue'";
}
else {
/****************************************************************************
* pending.c
- * $Id: pending.c,v 1.23 2005/10/15 02:49:04 momjian Exp $
- * $PostgreSQL: pgsql/contrib/dbmirror/pending.c,v 1.23 2005/10/15 02:49:04 momjian Exp $
+ * $Id: pending.c,v 1.23.2.1 2006/05/19 02:39:04 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/dbmirror/pending.c,v 1.23.2.1 2006/05/19 02:39:04 momjian Exp $
*
* This file contains a trigger for Postgresql-7.x to record changes to tables
* to a pending table for mirroring.
}
if (*cpUnFormatedPtr == '\\' || *cpUnFormatedPtr == '\'')
{
- *cpFormatedPtr = '\\';
+ *cpFormatedPtr = *cpUnFormatedPtr;
cpFormatedPtr++;
iUsedDataBlock++;
}
CREATE OR REPLACE FUNCTION earth() RETURNS float8
LANGUAGE 'sql' IMMUTABLE
-AS 'SELECT \'6378168\'::float8';
+AS 'SELECT ''6378168''::float8';
-- Astromers may want to change the earth function so that distances will be
-- returned in degrees. To do this comment out the above definition and