Re: Temparary disable constraint

From: "Adnan DURSUN" <a_dursun(at)hotmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temparary disable constraint
Date: 2007-01-17 09:14:25
Message-ID: BAY106-DAV22F57FEFAF966AA4CD60B6FAAB0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
Maybe added more further things to TODO list. Enabled / disabled other objects like view/funtion. imagine a lot of views that referances a table and i wanna drop a column on this table that used by these views. Postgres doesnt allow this. First i must drop these views then drop the column on that table and then recreate these views.
Can this be resolved (like oracle does) ?

Best regards

Adnan DURSUN
ASRIN Bilişim Ltd.
----- Original Message -----
From: Hubert FONGARNAND
To: Bruce Momjian
Cc: pgsql-hackers(at)postgresql(dot)org
Sent: Wednesday, January 17, 2007 10:36 AM
Subject: Re: [HACKERS] Temparary disable constraint

Ok it works, but we have to write a plpgsql function that takes the table_name and the constraint name in parameters....

It could be useful to have a : ALTER TABLE ... DISABLE CONSTRAINT ...
(as oracle does)

it could be good to add this to the TODO LIST...

Thanks

Le mardi 16 janvier 2007 à 22:02 -0500, Bruce Momjian a écrit :
Hubert FONGARNAND wrote:
> Hi,
>
> Is there a way to temporary disable a constraint (without drop and
> recreating it) in postgresql?

Sure, try ALTER TABLE ... DISABLE TRIGGER for the constraint trigger
name.

_______________________________________________
Ce message et les 鶥ntuels documents joints peuvent contenir des informations confidentielles.
Au cas o?ne vous serait pas destin鬠nous vous remercions de bien vouloir le supprimer et en aviser imm餩atement l'exp餩teur. Toute utilisation de ce message non conforme ࠳a destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'鴡nt pas s飵ris饳, l'int駲it頤e ce message n'est pas assur饠et la soci鴩 魥ttrice ne peut 괲e tenue pour responsable de son contenu.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-01-17 09:16:43 Re: .po translation
Previous Message Takayuki Tsunakawa 2007-01-17 09:05:56 Re: Idea for fixing the Windows fsync problem