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

feature request: auto savepoint for interactive psql when in transaction.

From: Will Leinweber <will(at)heroku(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: feature request: auto savepoint for interactive psql when in transaction.
Date: 2011-09-27 23:57:52
Message-ID: CAL8LqZREAvS3egKTrnf-Y5vxyO-v=k=jdBes8GUieQjzsVHH+A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify
the update worked. I suppose I have no one else to blame, but it was
really frustrating, to say the least. I assume this has happened to
others as well.

I only later found out about SAVEPOINT, which I immediately ran the
next time I attempted the huge update.

psql console, while in a transaction, and while in interactive mode,
should savepoint for me.

—Will

bqjezaraxa=# select count(*) from transactions where log='';
ERROR:  relation "transactions" does not exist

bqjezaraxa=# select count(*) from transfers where log='';
ERROR:  current transaction is aborted, commands ignored until end of
transaction block

bqjezaraxa=# oh damn it ;
ERROR:  syntax error at or near "oh"
LINE 1: oh damn it;

Responses

pgsql-hackers by date

Next:From: Royce AusburnDate: 2011-09-28 00:28:26
Subject: Re: [PATCH] Addition of some trivial auto vacuum logging
Previous:From: Jamie FoxDate: 2011-09-27 23:19:38
Subject: Mismatch of relation names: pg_toast.pg_toast_nnn during pg_upgrade from 8.4 to 9.1

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