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

Re: TRANSACTION FOR AN UPDATE COMMAND WITH ONE TABLE

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: TRANSACTION FOR AN UPDATE COMMAND WITH ONE TABLE
Date: 2010-04-08 09:48:04
Message-ID: hpk8ok$dsf$4@reversiblemaps.ath.cx (view raw or flat)
Thread:
Lists: pgsql-novice
On 2010-04-06, JORGE MALDONADO <jorgemal1960(at)gmail(dot)com> wrote:
> --001485e609d13a8c510483958cf7
> Content-Type: text/plain; charset=ISO-8859-1
>
> I have an UPDATE command which modifies several records of one (only one)
> table.
> Is it feasible (or a good idea) to include it in a transaction block to make
> sure the process is performed with integrity?
> Or
> Does PostgreSQL has some kind of auto-integrity check with simple DB
> operations like?

a single update command either succeeds or fails.
if it fails no records will have changed, if it succeds all the
matching records will have been updated.

wrapping it in a transaction will gain you nothing.


In response to

pgsql-novice by date

Next:From: Machiel RichardsDate: 2010-04-08 12:52:37
Subject: FW: Postgres cpu & memory usage
Previous:From: Jasen BettsDate: 2010-04-08 09:42:36
Subject: Re: Read only postgres server

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