Re: Database Integrity

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Database Integrity
Date: 2011-11-18 19:44:33
Message-ID: 20111118204433.143cddd1@anubis.defcon1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, 18 Nov 2011 13:32:03 -0600
JORGE MALDONADO <jorgemal1960(at)gmail(dot)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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel Staal 2011-11-18 19:46:48 Re: Database Integrity
Previous Message Ramy Abdel-Azim 2011-11-18 19:34:36 Re: Database Integrity