<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -162,144 +162,6 @@ sub new {
 	return $self;
 }
 
-
-
-sub addtable {
-	my ($self,$arg,$type) = @_;
-	return if ! defined $arg or ! ref $arg;
-	my @vals = grep { defined $arg-&gt;{$_} } @{$arg-&gt;cols};
-	my $flatargs = join &quot;,&quot; =&gt; @vals;
-	my $qs = join &quot;,&quot; =&gt; map { '?' } @vals;
-	my $maindbh = $self-&gt;{masterdbh};
-	$SQL = &quot;INSERT INTO bucardo.$type($flatargs) VALUES ($qs)&quot;;
-	$sth = $maindbh-&gt;prepare($SQL) or die &quot;Could not add a table: $!&quot;;
-	my $args = [map { $arg-&gt;{$_} } @vals];
-	$sth-&gt;execute(@$args);
-	$maindbh-&gt;commit();
-	return if $type ne 'goat';
-	return $self-&gt;{$type}{id} = $maindbh-&gt;selectall_arrayref(&quot;SELECT pg_catalog.lastval()&quot;)-&gt;[0][0];
-}
-
-
-sub remove_customcode {
-	my ($self,$arg) = @_;
-
-	defined $arg and ref $arg eq 'HASH' or die qq{Argument must be a hashref\n};
-
-	my $id = (exists $arg-&gt;{id} and length $arg-&gt;{id}) ? $arg-&gt;{id} : '';
-	my $name = (exists $arg-&gt;{name} and length $arg-&gt;{name}) ? $arg-&gt;{name} : '';
-	my $code = (exists $arg-&gt;{code} and length $arg-&gt;{code}) ? $arg-&gt;{code} : '';
-
-	if (!length $id and !length $name and !length $code) {
-		die qq{Did not find required argument\n};
-	}
-
-	my $dbh = $self-&gt;{masterdbh};
-
-	if (length $code) {
-		$code =~ /^\d+$/ or die qq{Argument 'code' is not numeric\n};
-		my $sync = (exists $arg-&gt;{sync} and length $arg-&gt;{sync}) ? $arg-&gt;{sync} : '';
-		my $goat = (exists $arg-&gt;{goat} and length $arg-&gt;{goat}) ? $arg-&gt;{goat} : '';
-		if (!length $sync and !length $goat) {
-			die qq{Did not find required argument sync or goat\n};
-		}
-		if (length $goat) {
-			$goat =~ /^\d+$/ or die qq{Argument goat is not numeric\n};
-			$SQL = &quot;DELETE FROM customcode_map WHERE code=? AND goat=?&quot;;
-			$sth = $dbh-&gt;prepare($SQL);
-			$count = $sth-&gt;execute($code,$goat);
-		}
-		else {
-			$SQL = &quot;DELETE FROM customcode_map WHERE code=? AND sync=?&quot;;
-			$sth = $dbh-&gt;prepare($SQL);
-			$count = $sth-&gt;execute($code,$sync);
-		}
-	}
-	elsif (length $id) {
-		$id =~ /^\d+$/ or die qq{Argument 'id' is not numeric\n};
-		$SQL = &quot;DELETE FROM customcode WHERE id = ?&quot;;
-		$sth = $dbh-&gt;prepare($SQL);
-		$count = $sth-&gt;execute($id);
-	}
-	else {
-		$SQL = &quot;DELETE FROM customcode WHERE name = ?&quot;;
-		$sth = $dbh-&gt;prepare($SQL);
-		$count = $sth-&gt;execute($name);
-	}
-	$dbh-&gt;commit();
-	return $count eq '0E0' ? 0 : $count;
-
-} ## end of remove_customcode
-
-sub make_dbgroup {
-	## Create a named dbgroup if it does not already exist
-	my ($self,$dbgname) = @_;
-	return if ! defined $dbgname;
-	my $dbgroups = $self-&gt;get_dbgroups();
-	return if exists $dbgroups-&gt;{$dbgname};
-	$self-&gt;glog(qq{Creating new dbgroup named &quot;$dbgname&quot;});
-	my $maindbh = $self-&gt;{masterdbh};
-	$SQL = &quot;INSERT INTO bucardo.dbgroup(name) VALUES (?)&quot;;
-	my $sth = $maindbh-&gt;prepare($SQL);
-	$sth-&gt;execute($dbgname);
-	$maindbh-&gt;commit();
-	return;
-} ## end of make_dbgroup
-
-
-sub make_herd {
-	## Create a named herd if it does not exist
-	my ($self,$herdname) = @_;
-	return if ! defined $herdname;
-	my $herds = $self-&gt;get_herds();
-	return if exists $herds-&gt;{$herdname};
-	$self-&gt;glog(qq{Creating new herd named &quot;$herdname&quot;});
-	my $maindbh = $self-&gt;{masterdbh};
-	$SQL = &quot;INSERT INTO bucardo.herd(name) VALUES (?)&quot;;
-	my $sth = $maindbh-&gt;prepare($SQL);
-	$sth-&gt;execute($herdname);
-	$maindbh-&gt;commit();
-	return;
-} ## end of make_herd
-
-
-sub find_goat {
-	## Return a goat id, given an id, a tablename, or a goat object
-	my ($self,$beast,$dbid) = @_;
-	my $goats = $self-&gt;get_goats();
-	my $goatid;
-	if (!defined $beast) {
-		die &quot;Invalid argument passed to find_goat\n&quot;;
-	}
-
-	if (ref $beast eq 'BCgoat') {
-		$goatid = $beast-&gt;id;
-	}
-	elsif ($beast =~ /^\d+$/o) { ## TODO: explicitly disallow numeric table names
-		exists $goats-&gt;{$beast} or die qq{Unknown goat id: $beast\n};
-		$goatid = $beast;
-	}
-	elsif (! defined $dbid) {
-		my @ids = map { $goats-&gt;{$_}{id} } grep { $goats-&gt;{$_}-&gt;{tablename} eq $beast } keys %$goats;
-		if ($#ids &gt;= 1) {
-			die qq{More than one table named &quot;$beast&quot; found: please specify a database\n};
-		}
-		$goatid = $ids[0];
-	}
-	else {
-		($goatid) =
-			map { $goats-&gt;{$_}{id} }
-			grep { $goats-&gt;{$_}-&gt;{tablename} eq $beast and $goats-&gt;{$_}{db} eq $dbid }
-			keys %$goats;
-	}
-	if (!defined $goatid) {
-		die qq{Invalid goat given: &quot;$beast&quot;\n};
-	}
-	return $goatid;
-} ## end of find_goat
-
-
-
 sub reload_config {
 
 	my ($self) = @_;</diff>
      <filename>Bucardo.pm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b6bb92a9f96b0816060155abdddb8bb731f38f0a</id>
    </parent>
  </parents>
  <author>
    <name>Greg Sabino Mullane</name>
    <email>greg@endpoint.com</email>
  </author>
  <url>http://github.com/unilogic/bucardo/commit/71127c4753b5a346f8e92f5844a413f8e4b9fdd9</url>
  <id>71127c4753b5a346f8e92f5844a413f8e4b9fdd9</id>
  <committed-date>2009-05-11T13:39:58-07:00</committed-date>
  <authored-date>2009-05-11T13:39:58-07:00</authored-date>
  <message>Remove more unused code</message>
  <tree>81e1c09ced9d9c021365d3c40559da6023c0f794</tree>
  <committer>
    <name>Greg Sabino Mullane</name>
    <email>greg@endpoint.com</email>
  </committer>
</commit>
