/usr/share/doc/libdbd-mysql-perl/examples/bug30033pg.pl is in libdbd-mysql-perl 4.020-1ubuntu0.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use DBI;
my $dsn = "DBI:Pg:database=postgres;host=localhost";
my $dbh = DBI->connect( $dsn, 'postgres', '', { RaiseError => 1 } )
or die $DBI::errstr;
$dbh->do('CREATE TABLE buggy ( id INT )');
$dbh->do('INSERT INTO buggy (id) VALUES (1)');
my $ref= $dbh->selectrow_arrayref(<<END, {}, 1);
SELECT id
FROM buggy
-- it's a bug!
WHERE id = ?
END
print Dumper $ref;
$dbh->do('DROP TABLE buggy');
|