Hubert FONGARNAND wrote:
> 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...

Well, we currently only allow disabling foreign key constraints (those
that have triggers).  There is no way to disable a UNIQUE or NOT NULL
constraint, for example, so I don't see how we can do DISABLE CONSTRAINT


> 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 ?entuels documents joints peuvent contenir des informations 
> confidentielles.
> Au cas o?il ne vous serait pas destin? nous vous remercions de bien vouloir 
> le supprimer et en aviser imm?iatement l'exp?iteur. Toute utilisation de ce 
> message non conforme ?sa destination, toute diffusion ou publication, totale 
> ou partielle et quel qu'en soit le moyen est formellement interdite.
> Les communications sur internet n'?ant pas s?uris?s, l'int?rit?de ce message 
> n'est pas assur? et la soci???ettrice ne peut ?re tenue pour responsable de 
> son contenu.

  Bruce Momjian   [EMAIL PROTECTED]

  + If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to