From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Jaime Casanova <systemguards(at)gmail(dot)com>, Tyler MacDonald <tyler(at)yi(dot)org>, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, Jochen Wiedmann <jochen(dot)wiedmann(at)gmail(dot)com>, Paul DuBois <paul(at)snake(dot)net>, dbi-users(at)perl(dot)org, perl(at)lists(dot)mysql(dot)com, pgsql-general(at)postgresql(dot)org |
Subject: | Re: undefined behaviour for sub-transactions? |
Date: | 2005-12-01 18:21:51 |
Message-ID: | 20051201182150.GA53238@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Dec 01, 2005 at 01:04:52PM -0500, Greg Stark wrote:
> Where is Postgres at with psql using savepoints implicitly to wrap every
> client command btw? My single biggest pet peeve with Postgres is that setting
> autocommit off in psql is basically unusable because any typo forces you to
> start your transaction all over again.
Are you looking for 8.1's ON_ERROR_ROLLBACK?
test=> \set ON_ERROR_ROLLBACK interactive
test=> begin;
BEGIN
test=> create table foo (x integer);
CREATE TABLE
test=> roeiuqrepuqw;
ERROR: syntax error at or near "roeiuqrepuqw" at character 1
LINE 1: roeiuqrepuqw;
^
test=> insert into foo values (123);
INSERT 0 1
test=> commit;
COMMIT
test=> select * from foo;
x
-----
123
(1 row)
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2005-12-01 18:24:20 | Re: 8.1, OID's and plpgsql |
Previous Message | Jaime Casanova | 2005-12-01 18:21:00 | Re: Question |