6 use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
8 require "$ENV{BFConfDir}/BuildFarmWeb.pl";
10 my $dsn="dbi:Pg:dbname=$dbname";
11 $dsn .= ";host=$dbhost" if $dbhost;
12 $dsn .= ";port=$dbport" if $dbport;
14 my $dbh = DBI->connect($dsn,$dbuser,$dbpass) or die("$dsn,$dbuser,$dbpass,$!");
19 select sysname, max(snapshot) as snapshot
21 where branch = 'HEAD' and
22 log_stage = 'typedefs.log' and
23 snapshot > current_date::timestamp - interval '30 days'
26 my $builds = $dbh->selectall_arrayref($sql, { Slice => {} });
33 and log_stage = 'typedefs.log'
37 my $sth = $dbh->prepare($sql);
39 foreach my $build (@$builds)
41 $sth->execute($build->{sysname},$build->{snapshot});
42 my @row = $sth->fetchrow;
43 my @typedefs = split(/\s+/,$row[0]);
44 @words{@typedefs} = 1 x @typedefs;
47 print "Content-Type: text/plain\n\n",
48 join("\n",sort keys %words),