pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?
2+ messages / 2 participants
[nested] [flat]
* ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?
@ 2005-10-26 01:13 Bath, David <dave.bath@unix.net>
0 siblings, 1 reply; 2+ messages in thread
From: Bath, David @ 2005-10-26 01:13 UTC (permalink / raw)
To: 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 constraint or 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 - but I wear jackboots
where documentation is concerned :-) and get at these for autodoccing
and/or generation of meaningful messages 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 triggers or
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 imagine reasons
that /might/ be a bad idea for paranoid info management governance).
Thanks in advance
--
David T. Bath
dave.bath@unix.net
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?
@ 2005-10-26 01:38 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Bath, David <dave.bath@unix.net>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2005-10-26 01:38 UTC (permalink / raw)
To: dave.bath@unix.net; +Cc: pgsql-sql
Please see the 8.1 beta release notes for new capabilities in that
release.
---------------------------------------------------------------------------
Bath, David wrote:
> 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 constraint or 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 - but I wear jackboots
> where documentation is concerned :-) and get at these for autodoccing
> and/or generation of meaningful messages 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 triggers or
> 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 imagine reasons
> that /might/ be a bad idea for paranoid info management governance).
>
> Thanks in advance
> --
> David T. Bath
> dave.bath@unix.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-10-26 01:38 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-26 01:13 ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements? Bath, David <dave.bath@unix.net>
2005-10-26 01:38 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox