Can someone tell me how to use Postgres cursors through perl? A sample isbelow. Is there some way to keep the transaction active between$conn-exec calls?
#!/usr/local/bin/perluse Pg;my $conn = Pg::connectdb("dbname = test");
my $result = $conn->exec("begin work; declare c1 cursor for select fld1from tbl1 ; ");
$result = $conn->exec("fetch forward 1 in c1;");print "Hurray, I fetched a row: " . $result->fetchrow . "\n";
$result = $conn->exec("end work;");
jrf(at)roog:~/$ perl test_cursor.plNOTICE: PerformPortalFetch: portal "c1" not foundHurray, I fetched a row:NOTICE: COMMIT: no transaction in progressjrf(at)roog:~/$