From: Andrew Dunstan Date: Sun, 19 Dec 2010 01:12:57 +0000 (-0500) Subject: handle modern bytea nicely. X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/0daa6a52894a56a5bf09cfd14970e652d768a554 handle modern bytea nicely. --- diff --git a/bf-alerts.pl b/bf-alerts.pl index 66c0c6d..2481371 100755 --- a/bf-alerts.pl +++ b/bf-alerts.pl @@ -116,6 +116,10 @@ print "starting alert run: $lts\n"; foreach my $sysbranch (@last_heard) { + # not all versions of DBD::Pg decode modern bytea literals nicely. cope. + $sysbranch->{config} =~ s/^(\\?x)([a-fA-F0-9]+)$/pack('H*',$2)/e; + + my $client_conf = thaw $sysbranch->{config}; my %client_alert_settings = %{ $client_conf->{alerts} || {} };