Re: Limit on updates made in a transaction

Поиск
Список
Период
Сортировка
От Darren Ferguson
Тема Re: Limit on updates made in a transaction
Дата
Msg-id Pine.LNX.4.44.0207290840120.31284-100000@thread.crystalballinc.com
обсуждение исходный текст
Ответ на Limit on updates made in a transaction  (kent@cpttm.org.mo (Kent Tong))
Список 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 по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: log sql?
Следующее
От: Oliver Kohll
Дата:
Сообщение: Re: Postgres and Perl: Which DBI module?