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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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