Skip site navigation (1) Skip section navigation (2)

Re: Continue transactions after errors in psql

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>,pgsql-patches(at)postgresql(dot)org
Subject: Re: Continue transactions after errors in psql
Date: 2005-01-30 02:47:59
Message-ID: 20050130024759.GA8598@dcc.uchile.cl (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Sat, Jan 29, 2005 at 01:04:36PM +0100, Michael Paesold wrote:
> Greg Sabino Mullane wrote:
> 
> >Michael Paesold wrote:
> >>2) Implement a server-side function to get the savepoints from the server
> >>and query that before every release.
> >
> >I could not find a way to do this. Is there any interface to the list?
> 
> Alvaro suggested to implement such a function. It is not there yet. I think 
> you would have to access the sub xact stack, but I have not looked into 
> that code for quite some time.
> http://archives.postgresql.org/pgsql-general/2004-10/msg00370.php

The only problem with this idea is that the function cannot be run when
the transaction is in aborted state.  Not sure if that is a problem or
not.  What happens if the user does

SAVEPOINT foo; SLECT 1; ROLLBACK TO foo;

all in one command in psql?

I know psql sends that as three commands, so maybe it's not an issue.

-- 
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Doing what he did amounts to sticking his fingers under the hood of the
implementation; if he gets his fingers burnt, it's his problem."  (Tom Lane)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-01-30 03:07:30
Subject: Re: Bug in create operator and/or initdb
Previous:From: John HansenDate: 2005-01-30 02:46:34
Subject: Re: Bug in create operator and/or initdb

pgsql-patches by date

Next:From: Nicolai TufarDate: 2005-01-30 10:17:35
Subject: Repleacement for src/port/snprintf.c
Previous:From: Michael PaesoldDate: 2005-01-29 12:04:36
Subject: Re: Continue transactions after errors in psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group