?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements? - Mailing list pgsql-sql

From Bath, David
Subject ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?
Date
Msg-id 200510261113.43685.dave.bath@unix.net
Whole thread Raw
Responses Re: ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-sql
Folks,

Summary: Does postgresql have equivalents to the following Oracle statements?   DISABLE CONSTRAINT ...   ENABLE
CONSTRAINT...   DISABLE TRIGGER ...   ENABLE TRIGGER ...
 

Background: One of the advantages of Oracle over some competitors such as MS-SQL and Sybase is the ability to toggle a
constraintor trigger on and off, without blatting it, and without the hassle of finding any code and any accessory
information(like comments, permissions...).
 
 BTW, I personally put C-style comments at the front of the clause so I can get the why's/how's into the syscatalogs -
butI wear jackboots where documentation is concerned :-) and get at these for autodoccing and/or generation of
meaningfulmessages to users when raising exception messages from the server.
 
 This capability is especially useful when there is some disgusting data-munging by a DBA, not just for import/export.
 I've tried grovelling through the sql from a pg_dump invoked with --disable-triggers, but it has no enable/disable
triggersor constraints, merely creating primary/foreign constraints AFTER issuing the COPY.
 
 Yep, I'd expect this ONLY to work when issued by someone with DBA privs (and maybe the target object owner, although I
imaginereasons that /might/ be a bad idea for paranoid info management governance).
 

Thanks in advance
-- 
David T. Bath
dave.bath@unix.net



pgsql-sql by date:

Previous
From: chester c young
Date:
Subject: broken join optimization? (8.0)
Next
From: Bruce Momjian
Date:
Subject: Re: ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?