[Bucardo-general] b4: avoiding Pg's parentheses default mismatch on sync validate

Greg Sabino Mullane greg at endpoint.com
Fri Mar 16 03:16:26 UTC 2012


> Looking at the source I see a check for this, but I can't seem to figure 
> out where the A and z in the regex comes from.

Those are meant to anchor the open and close parens, so that we only strip 
parens on the very outside of an expression, not inside. Which completely 
fails in the case of an explicit cast, as you just showed us. :)

I added a quick fix in commit 5a543b2f64675255ee988a672f6579e7bc68834e 
that looks like this:

--- a/Bucardo.pm
+++ b/Bucardo.pm
@@ -2064,6 +2064,7 @@ sub start_mcp {
                         for ($scol_def, $fcol_def) {
                             s/\A\(//;
                             s/\)\z//;
+                           s/\)::/::/;
                         }
                         my $msg;
                         if ($scol_def eq $fcol_def) {


-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- 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/20120315/2d190dec/attachment.bin 


More information about the Bucardo-general mailing list