handle modern bytea nicely.
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 19 Dec 2010 01:12:57 +0000 (20:12 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Sun, 19 Dec 2010 01:12:57 +0000 (20:12 -0500)
bf-alerts.pl

index 66c0c6d89c6ad9bfaccaba1f99610e22f5044474..248137185a9aab4522625207cf7bef0a05a26302 100755 (executable)
@@ -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} || {} };