Fixes for the new bucardo_delta_names table.
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 12 Nov 2013 05:15:23 +0000 (00:15 -0500)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 12 Nov 2013 05:15:23 +0000 (00:15 -0500)
bucardo.schema

index c5353943e56b5224c5a7684aa00d24b00464af8f..4ba7662b8c19939dd950f459a0315850b0a35d25 100644 (file)
@@ -1479,10 +1479,10 @@ IMMUTABLE
 AS $bcc$
 BEGIN
 IF NEW.deltaname IS NULL THEN
-  NEW.deltaname = 'delta_' || bucardo.bucardo_tablename_maker(NEW.tablename);
+  NEW.deltaname = bucardo.bucardo_tablename_maker(NEW.tablename, 'delta_');
 END IF;
 IF NEW.trackname IS NULL THEN
-  NEW.trackname = 'track_' || bucardo.bucardo_tablename_maker(NEW.tablename);
+  NEW.trackname = bucardo.bucardo_tablename_maker(NEW.tablename, 'track_');
 END IF;
 RETURN NEW;
 END;
@@ -2062,7 +2062,9 @@ SELECT 'Fixme'::TEXT;
 
             $SQL .= '(nspname = ? AND relname = ?) OR ';
             push @args => $remoteschema, $remotetable;
-            push @args2 => $syncname, "$remoteschema.$remotetable";
+            if ($goat{$schema}{$table}{reltype} eq 'table') {
+                push @args2 => $syncname, "$remoteschema.$remotetable";
+            }
 
         } ## end each table