Re: Database Integrity - Mailing list pgsql-novice

From Jean-Yves F. Barbier
Subject Re: Database Integrity
Date
Msg-id 20111118204433.143cddd1@anubis.defcon1
Whole thread Raw
In response to Database Integrity  (JORGE MALDONADO <jorgemal1960@gmail.com>)
Responses Re: Database Integrity  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
List pgsql-novice
On Fri, 18 Nov 2011 13:32:03 -0600
JORGE MALDONADO <jorgemal1960@gmail.com> wrote:

> I need to delete several records from a table so my query is composed of a
> DELETE command with a condition, something like the following:
>
> DELETE FROM tblTable WHERE field1 = something
>
> Do I need to use a transaction in an operation like this to be sure the
> database remains integral in case of an error?

AFAIK no because even if you're not in your transaction, Pg opens its own (hence
rollback if something bad happens).

--
Living on Earth may be expensive, but it includes an annual free trip
around the Sun.

pgsql-novice by date:

Previous
From: Ramy Abdel-Azim
Date:
Subject: Re: Database Integrity
Next
From: "Daniel Staal"
Date:
Subject: Re: Database Integrity