Re: Limit on updates made in a transaction - Mailing list pgsql-general

From Darren Ferguson
Subject Re: Limit on updates made in a transaction
Date
Msg-id Pine.LNX.4.44.0207290840120.31284-100000@thread.crystalballinc.com
Whole thread Raw
In response to Limit on updates made in a transaction  (kent@cpttm.org.mo (Kent Tong))
List pgsql-general
Use transactions

If you have it stored in a transaction you can rollback the whole
transaction on any error

Begin;

INSERT INTO foo VALUES ('bar');
INSERT INTO foo's VALUES ('bar'); <-- produce error

Rollback;

Now foo will not have the row bar in it

HTH

On 26 Jul 2002, Kent Tong wrote:

> Hi,
>
> Is there is any limit on the number of updates made to a
> postgreSQL database in a single transaction? If yes, how
> can we get around this problem? For example, we need to
> update a field of many existing rows in a table triggered
> by the addition of a new row. If anything fails in the
> update process, we'd like to undone everything (including
> the addition of the new row).
>
> Thanks in advance for any info!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
Darren Ferguson


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: log sql?
Next
From: Oliver Kohll
Date:
Subject: Re: Postgres and Perl: Which DBI module?