From: | Network Administrator <netadmin(at)vcsn(dot)com> |
---|---|
To: | Doug McNaught <doug(at)mcnaught(dot)org> |
Cc: | postgres general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Interfaces that support cursors |
Date: | 2003-10-10 17:56:37 |
Message-ID: | 1065808597.3f86f2d5cc649@webmail.vcsn.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Quoting Doug McNaught <doug(at)mcnaught(dot)org>:
> Network Administrator <netadmin(at)vcsn(dot)com> writes:
>
> > I've got a Pg 7.1.3 release that I'm going to upgrade to 7.4 but in the
> meantime
> > I wanted to know if Pg.pm (or DBD:Pg) supported using cursors. I would
> guess
> > that they they don't because from what I understand every executed query in
> this
> > interface is implicitly wrapped in a transaction (thus there is an
> implicit
> > commit that would close the cursor).
>
> I haven't used Pg.pm, but DBD::Pg has an "autocommit" flag when
> creating a new connection, to control this behavior. If you turn off
> autocommit, you can use DECLARE to create a cursor and FETCH to get
> rows from it, just as with any other interface, as long as your
> transaction is open.
>
> The DBI and DBD::Pg docs describe everything pretty well.
>
> -Doug
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
Ok, I did see the autocommit flag setting in DBD:Pg when I starting reading up
on the DBI/DBD interfacing methods so I guess I could recode for that. However,
how do you "maintain" the current transaction open if your script is writing
pages to the web. Even in mod_perl I think that there is a commit after the
script ends, no?
--
Keith C. Perry
Director of Networks & Applications
VCSN, Inc.
http://vcsn.com
____________________________________
This email account is being host by:
VCSN, Inc : http://vcsn.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2003-10-10 18:01:32 | Re: Table partitioning for maximum speed? |
Previous Message | Jeff Boes | 2003-10-10 17:40:17 | Re: Table partitioning for maximum speed? |