Re: savepoint improvements

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jaime Casanova" <systemguards(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: savepoint improvements
Date: 2007-01-22 18:49:48
Message-ID: b42b73150701221049k16936df1m4fdbaf022274ae22@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/22/07, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
> I don't understand this either. Everything you can do with nested
> transactions you can also do with savepoints, so I'm really not
> understand what the limitations are?
>
> Actually, looking at the savepoint documentation, it looks like there
> is no way to say:
>
> if transaction_state ok then
> release X
> else
> rollback to X

exactly.

> Which is what a normal COMMIT does (sort of). This is very irritating
> for scripting, so maybe a "COMMIT TO X" command would be auseful
> addition?

right. thats exactly what I want (more or less, there are a couple of
different ways to do it, but this is perfectly acceptable). The on
errors bit was just a froofy addition that distracted from the core
problem.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-01-22 18:52:11 Re: [HACKERS] Win32 WEXITSTATUS too
Previous Message Alvaro Herrera 2007-01-22 18:46:25 Re: [HACKERS] Win32 WEXITSTATUS too