http://qs321.pair.com?node_id=11127500


in reply to Re: Posgres batch read with DBI?
in thread Posgres batch read with DBI?

Many thanks for the pointer. Running this (SqlSupport is a homebrew helper module):
use lib qw ( c:/perlmodules ); use SqlSupport; my $dbh = connectpgdb(*,*,*,*,*); my $query = "select id,post from blog where language = 'en'"; my $sth = $dbh->prepare($query); $sth->execute || die "Could not execute MySQL statement: $sqlstatement +"; my $rows = []; # cache for batches of rows while( my $row = ( shift(@$rows) || shift(@{$rows=$sth->fetchall_array +ref(undef,10_000) || []}))) { my $foo = 1; } $sth->finish();
It's saying the last bracket is unmatched. But my IDE shows every bracket has a mate, and I clipped the whole while loop from the DBI docs.