Re: Oracle vs PG

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Ravi Krishna <srkrishna1(at)aol(dot)com>, adrian(dot)klaver(at)aklaver(dot)com, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Oracle vs PG
Date: 2018-10-24 05:44:12
Message-ID: 20181024054412.GM1658@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 24, 2018 at 07:31:57AM +0200, Laurenz Albe wrote:
> I have seen people use savepoints in PostgreSQL to emulate Oracle's
> "statement rollback" behavior: If a statement fails, only the statement
> is undone, but the transaction continues.
>
> If you insert a savepoint before *every* statement in a transaction,
> you can get a similar behavior in PostgreSQL, but the performance will
> suck.

The Postgres ODBC driver actually does that, and I have seen
applications actually ready to pay the cost of extra round trips to the
server to be able to get this property, even if that costs performance.
You can issue a query through the driver and rollback at will this way
to the previous state of the transaction.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ghislain ROUVIGNAC 2018-10-24 07:48:11 Portworx snapshots
Previous Message Boris Sagadin 2018-10-24 05:39:44 Re: Postgres 10, slave not catching up with master