Re: [HACKERS] cursors outside transactions

2003-03-23 Thread Dave Cramer
On Tue, 2003-03-18 at 19:00, Hiroshi Inoue wrote: > Bruce Momjian wrote: > > > > Tom Lane wrote: > > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > > > The question here is do we want to offer a half-baked solution, > > > recognizing that it's some improvement over no solution at all? > > > Or

Re: [HACKERS] cursors outside transactions

2003-03-19 Thread snpe
On Wednesday 19 March 2003 04:33 am, you wrote: > Dave Cramer <[EMAIL PROTECTED]> writes: > > On Tue, 2003-03-18 at 19:00, Hiroshi Inoue wrote: > >> ODBC(maybe JDBC also) has cross-transaction result sets > >> (rather than cursors) since long by simply holding all > >> results for a query at client

Re: [HACKERS] cursors outside transactions

2003-03-18 Thread Dave Cramer
On Tue, 2003-03-18 at 19:00, Hiroshi Inoue wrote: > Bruce Momjian wrote: > > > > Tom Lane wrote: > > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > > > The question here is do we want to offer a half-baked solution, > > > recognizing that it's some improvement over no solution at all? > > > Or

Re: [HACKERS] cursors outside transactions

2003-03-18 Thread Peter Eisentraut
Neil Conway writes: > I'm currently planning to implement (1), as it is sufficient for the > immediate need that I'm facing. What need are you facing, and why is it not sufficient to explicitly store the query results in a temporary table? -- Peter Eisentraut [EMAIL PROTECTED] -

Re: [HACKERS] cursors outside transactions

2003-03-17 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Why don't you like (1)? It seems fine to me, and I don't see how we are > magically going to do any better in the future. The restrictions of (1) seem pretty obvious to me ... but I don't see any prospect of doing better in the near future, either. Cros

Re: [HACKERS] cursors outside transactions

2003-03-17 Thread Bruce Momjian
I think (1) is fine. When I used Informix, we did lots of huge cursors that we pulled from for reports, and they consumed huge amounts of RAM before we could do a fetch --- and we expected that. It doesn't seem worth adding complexity to avoid that, especially since even if (2) was done, there w

Re: [HACKERS] cursors outside transactions

2003-03-17 Thread Alvaro Herrera
On Mon, Mar 17, 2003 at 10:26:07PM -0500, Neil Conway wrote: > On Mon, 2003-03-17 at 22:01, Alvaro Herrera wrote: > > What about opening a pseudo-transaction that exists only to serve the > > cursor? > > What exactly do you mean by a pseudo-transaction? Assign an xid, create the transaction (crea

Re: [HACKERS] cursors outside transactions

2003-03-17 Thread Neil Conway
On Mon, 2003-03-17 at 22:01, Alvaro Herrera wrote: > What about opening a pseudo-transaction that exists only to serve the > cursor? What exactly do you mean by a pseudo-transaction? Keep in mind we don't have nested transactions (yet?), and that the holdable cursor needs to be accessible both in

Re: [HACKERS] cursors outside transactions

2003-03-17 Thread Alvaro Herrera
On Mon, Mar 17, 2003 at 09:48:34PM -0500, Neil Conway wrote: > (2) Use MVCC to ensure that the snapshot of the database that the > transaction had is still valid, even after the transaction itself has > committed. What about opening a pseudo-transaction that exists only to serve the cursor? Tha