[EMAIL PROTECTED] (Tim Bunce) writes:

> On Wed, Sep 03, 2003 at 04:24:28PM -0700, Konigsberg, Jay wrote:
> > Hi all,
> > 
> > The Perl DBI doesn't support INSERT, or UPDATE cursors, which is a pity,
> > because they can dramatically reduce the time it takes for many programs to run.
> 
> Driver for databases which support named cursors should support
> functionality something like this:
> 
> my $select_sth = $dbh->prepare("SELECT ... from t FOR UPDATE");
> $select_sth->execute;
> my $update_sth = $dbh->prepare("UPDATE t SET f=? WHERE CURRENT OF 
> $select_sth->{CursorName}");
> while (my $row = $select_sth->fetchrow_arrayref) {
>     $update_sth->execute(...);
> }

DBD::Ingres does. Ingres requires that the column-names are provided in the FOR UPDATE 
clause,
otherwise exactly as above.
--
Henrik Tougaard, DBD::Ingres maintainer

Reply via email to