pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Riccardo G. Facchini <abief_ag_-postgresql@yahoo.com>
To: pgsql-sql@postgresql.org
Cc: Theodore Petrosky <tedpet5@yahoo.com>
Cc: Andrei Bintintan <klodoma@ar-sd.net>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: sad <sad@bankir.ru>
Subject: Re: A transaction in transaction? Possible?
Date: Wed, 10 Nov 2004 00:45:19 -0800 (PST)
Message-ID: <20041110084519.10681.qmail@web13902.mail.yahoo.com> (raw)
In-Reply-To: <20041110062510.GA54426@winnie.fuhr.org>
Sorry, but I understand that your example is not really about nested
transactions, but about sequential transactions.
so, the primary question remains:
how to commit/rollback them ?
--- Michael Fuhr <__> wrote:
> On Wed, Nov 10, 2004 at 09:23:02AM +0300, sad wrote:
> > On Tuesday 09 November 2004 18:24, Theodore Petrosky wrote:
> > > I thought nested transactions are available in the new
> > > release (8) coming up.
> >
> > how to commit/rollback them ?
>
> CREATE TABLE person (id SERIAL PRIMARY KEY, name TEXT NOT NULL);
>
> BEGIN;
> INSERT INTO person (name) VALUES ('Tom');
> SAVEPOINT foo;
> INSERT INTO person (name) VALUES ('Dick');
> ROLLBACK TO foo;
> INSERT INTO person (name) VALUES ('Harry');
> COMMIT;
>
> SELECT * FROM person;
> id | name
> ----+-------
> 1 | Tom
> 3 | Harry
> (2 rows)
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
view thread (18+ messages) latest in thread
Message-ID: <20041110084519.10681.qmail@web13902.mail.yahoo.com> Permalink: ../20041110084519.10681.qmail@web13902.mail.yahoo.com/ Also on: postgresql.org/message-id/20041110084519.10681.qmail@web13902.mail.yahoo.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-sql@postgresql.org Cc: abief_ag_-postgresql@yahoo.com, tedpet5@yahoo.com, klodoma@ar-sd.net, mike@fuhr.org, sad@bankir.ru Subject: Re: A transaction in transaction? Possible? In-Reply-To: <20041110084519.10681.qmail@web13902.mail.yahoo.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox