dalibo/pgbadger — pull request #101 by segv (2013-07-30 22:59:37+00:00)
Title: avoid "negative look behind not implemented" errors on perl 5.16/5.18

The string ST (two characters) is the uppercase version of ﬆ (one character). Due to this the regular expression at line 5086:

$code =~ s/(?$KEYWORDS1[$x]<\/span>/igs;

Can have a variable length if the /i modifier is in use (as it is in this regexp). This patch simply disables the /i modifier inside the negative lookbehind (which is ok because we've added in the exact string we're matching against, and it didn't have a ﬆ in it.

Since i don't know how to (easily) split this into 3 pull requests there are two other changes in here as well:

1. use #!/usr/bin/env perl instead of #!/usr/bin/perl so that perlbrew'd perls can be used easily
2. handle the output of 'select now()::timestamp' as input to the -b and -e parameters.

these two are nice, but i wouldn't really call them bugs.