[Bucardo-general] Sync of fields with user-function as default, Sync of XML fields
Greg Sabino Mullane
greg at endpoint.com
Thu Sep 2 14:14:49 UTC 2010
On Wed, Sep 01, 2010 at 03:05:15PM +0200, Franz Dürr wrote:
> I encountered 2 problems:
> 1. The user function 'client_user_id()' used for DEFAULT is seen by MCP
> with schema for the master db, e.g. public.client_user_id() and without
> schema for the remote db, e.g. public.client_user_id(), although the same
> schema was used to generate them.
This is a known problem and has been fixed. Let me whip up a proper patch
so that you can avoid this problem on 4.4.0. Okay, put into git and
will attach to this email.
> 2. The attr - field crashes, as there is no equal-operator for XML.
> This obviouly means, that you can't sync XML-fields..
...
> I tried to supply an equal operator for the xml-type in schemes 'public'
> and 'bucardo', but to no avail:
...
> Does DBD ignore user defined operators or am i using the wrong schema?
> I'm stuck at this point and would greatly appreciate any help
As far as I know, that should work. I'd try running some sql at the
command line to see if you can duplicate that error, then ask for
help on #postgresql on irc.freenode.net.
--
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
--- Bucardo.pm 2010/09/02 14:08:46 1.1
+++ Bucardo.pm 2010/09/02 14:09:47
@@ -1832,6 +1832,9 @@
push @{$g->{binarypkey}} => 0;
}
+ ## Turn off the search path, to help the checks below match up
+ $srcdbh->do('SET LOCAL search_path = pg_catalog');
+
## Check the source columns, and save them
$sth = $sth{checkcols};
$sth->execute($g->{oid});
@@ -1878,6 +1881,8 @@
push @{$g->{binarycols}}, $colinfo->{$colname}{order};
}
+ $srcdbh->do('RESET search_path');
+
} ## end if reltype is table
## If a sequence, grab all info as a hash
@@ -1976,6 +1981,9 @@
## Store away our oid, as we may need it later to access bucardo_delta
$g->{targetoid}{$db} = $oid;
+ ## Turn off the search path, to help the checks below match up
+ $dbh->do('SET LOCAL search_path = pg_catalog');
+
## Grab column information about this table
$sth = $dbh->prepare($SQL{checkcols});
$sth->execute($oid);
@@ -1987,6 +1995,8 @@
$targetcolinfo->{$_}{realattnum} = $x++;
}
+ $dbh->do('RESET search_path');
+
my $t = "$g->{schemaname}.$g->{tablename}";
## We'll state no problems until we are proved wrong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20100902/94f2c36b/attachment.bin
More information about the Bucardo-general
mailing list