Re: [Re] Re: PREPARE and transactions

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Re] Re: PREPARE and transactions
Date: 2004-06-26 03:43:54
Message-ID: 20040626034354.GA1058@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 25, 2004 at 08:54:57AM -0400, Merlin Moncure wrote:

> I would be fine with changing the lifetime if an EXECUTE failure did not
> abort the current transaction. Then I could simply watch the return
> code of the statement execution and prepare the statement on
> demand...from my point of view, this would actually be the most elegant
> scenario.

BEGIN;
... do something ... ;
SUBBEGIN;
EXECUTE ...;
-- if it fails:
-- SUBABORT;
-- PREPARE ...;
-- SUBBEGIN;
-- EXECUTE ...;
-- can continue as if nothing happened
SUBCOMMIT;
COMMIT;

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Acepta los honores y aplausos y perderás tu libertad"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-06-26 04:01:21 Re: [COMMITTERS] pgsql-server: Support renaming of tablespaces, and
Previous Message Greg Sabino Mullane 2004-06-26 02:32:43 Re: PREPARE and transactions