Re: Savepoint performance

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "Mark Lewis" <mark(dot)lewis(at)mir3(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Savepoint performance
Date: 2006-07-28 00:52:24
Message-ID: c2d9e70e0607271752j6ce91a90ld199c7a0d752fc62@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 7/27/06, Mark Lewis <mark(dot)lewis(at)mir3(dot)com> wrote:
> All,
>
> I support a system that runs on several databases including PostgreSQL.
> I've noticed that the other DB's always put an implicit savepoint before
> each statement executed, and roll back to that savepoint if the
> statement fails for some reason. PG does not, so unless you manually
> specify a savepoint you lose all previous work in the transaction.
>

you're talking about transactions not savepoints (savepoints is
something more like nested transactions), i guess...

postgres execute every single statement inside an implicit transaction
unless you put BEGIN/COMMIT between a block of statements... in that
case if an error occurs the entire block of statements must
ROLLBACK...

if other db's doesn't do that, is a bug in their implementation of the
SQL standard

--
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Denis Lussier 2006-07-28 01:13:05 Re: Savepoint performance
Previous Message Tom Lane 2006-07-27 22:22:05 Re: Query plan issue when upgrading to postgres 8.14 (from