From 0daa6a52894a56a5bf09cfd14970e652d768a554 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 18 Dec 2010 20:12:57 -0500 Subject: [PATCH] handle modern bytea nicely. --- bf-alerts.pl | 4 ++++ 1 file changed, 4 insertions(+) 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} || {} }; -- 2.30.2