Re: DBD::Pg/perl question, kind of...

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Douglas McNaught <doug(at)mcnaught(dot)org>
Cc: Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>, Neal Clark *EXTERN* <nclark(at)securescience(dot)net>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: DBD::Pg/perl question, kind of...
Date: 2007-03-12 14:09:37
Message-ID: 20070312140937.GA35220@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 12, 2007 at 08:38:52AM -0400, Douglas McNaught wrote:
> You are restricted to staying in a transaction while the cursor is
> open, so if you want to work outside of transactions LIMIT/OFFSET
> is your only way.

http://www.postgresql.org/docs/8.2/interactive/sql-declare.html

"If WITH HOLD is specified and the transaction that created the
cursor successfully commits, the cursor can continue to be accessed
by subsequent transactions in the same session. (But if the creating
transaction is aborted, the cursor is removed.) A cursor created
with WITH HOLD is closed when an explicit CLOSE command is issued
on it, or the session ends. In the current implementation, the rows
represented by a held cursor are copied into a temporary file or
memory area so that they remain available for subsequent transactions."

--
Michael Fuhr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-12 14:13:48 Re: [GENERAL] PostgreSQL crashes on Windows 2003
Previous Message Magnus Hagander 2007-03-12 13:56:17 Re: [GENERAL] PostgreSQL crashes on Windows 2003