Re: drop/add fk in transaction - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: drop/add fk in transaction
Date
Msg-id 1060821370.4750.34.camel@billy
Whole thread Raw
In response to Re: drop/add fk in transaction  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: drop/add fk in transaction
List pgsql-novice
Am Don, 2003-08-14 um 02.36 schrieb Stephan Szabo:
> On 14 Aug 2003, Nabil Sayegh wrote:
>
> > I want to convert a database from 7.2 RI to 7.3 RI
> > I need to drop 165 RI_ConstraintTrigger and
> > add 55 7.3-style foreign keys.
> >
> > Is it possible to do all that in a transaction ?
>
> It should be fine I think barring that you probably
> don't want other transactions going on that might
> touch those tables concurrently because you're going
> to be grabbing exclusive locks on a bunch of tables
> and you want to make sure you don't deadlock with
> some other transaction.

The action should take only 2 seconds or so.
I think it would be ok for that case to lock everything :) while this
transaction is running.

Do you have a commandline by hand ?

Usually I would just do begin; ... end;

TFYH
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : http://www.e-trolley.de


pgsql-novice by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: drop/add fk in transaction
Next
From: Stephan Szabo
Date:
Subject: Re: drop/add fk in transaction