Re: [Re] Re: PREPARE and transactions - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [Re] Re: PREPARE and transactions
Date
Msg-id 20040626034354.GA1058@dcc.uchile.cl
Whole thread Raw
In response to Re: [Re] Re: PREPARE and transactions  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List 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 happenedSUBCOMMIT;
 
COMMIT;

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



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Missing tablespace function
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql-server: Support renaming of tablespaces, and