@@ -681,3 +681,144 @@ Bruce Momjian wrote:
681
681
>
682
682
> http://archives.postgresql.org
683
683
684
+ From christoph.dalitz@hs-niederrhein.de Thu Nov 28 03:35:25 2002
685
+ Return-path: <christoph.dalitz@hs-niederrhein.de>
686
+ Received: from hera.hs-niederrhein.de (hera.hs-niederrhein.de [194.94.120.3])
687
+ by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id gAS8ZLP06871
688
+ for <pgman@candle.pha.pa.us>; Thu, 28 Nov 2002 03:35:23 -0500 (EST)
689
+ Received: (from root@localhost)
690
+ by hera.hs-niederrhein.de (8.11.6+Sun/8.11.6) id gAS8ZGZ16207;
691
+ Thu, 28 Nov 2002 09:35:16 +0100 (CET)
692
+ Received: from pc03230 (pc03230.kr.hs-niederrhein.de [194.94.121.230])
693
+ by hera.hs-niederrhein.de (8.11.6+Sun/8.11.6) with SMTP id gAS8ZDP16199;
694
+ Thu, 28 Nov 2002 09:35:13 +0100 (CET)
695
+ Date: Thu, 28 Nov 2002 09:33:57 +0100
696
+ From: Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>
697
+ To: Jean-Luc Lachance <jllachan@nsd.ca>
698
+ cc: Bruce Momjian <pgman@candle.pha.pa.us>,
699
+ Tino Wildenhain <tino@wildenhain.de>, pgsql-general@postgresql.org
700
+ Subject: Re: ALTER TRIGGER DISABLE/ENABLE
701
+ Message-ID: <20021128093357.48c9d644.christoph.dalitz@hs-niederrhein.de>
702
+ In-Reply-To: <3DE3CE7B.614EE99E@nsd.ca>
703
+ References: <200211261853.gAQIrdE00304@candle.pha.pa.us>
704
+ <3DE3CE7B.614EE99E@nsd.ca>
705
+ Organization: FH Niederrhein
706
+ X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu)
707
+ MIME-Version: 1.0
708
+ Content-Type: text/plain; charset=US-ASCII
709
+ Content-Transfer-Encoding: 7bit
710
+ X-Virus-Scanned: by AMaViS perl-11
711
+ Status: OR
712
+
713
+ On Tue, 26 Nov 2002 14:41:47 -0500
714
+ Jean-Luc Lachance <jllachan@nsd.ca> wrote:
715
+ >
716
+ > I think thte sintax should be:
717
+ >
718
+ > ALTER TABLE DISABLE|ENABLE TRIGGER {trigger name}|ALL
719
+ >
720
+ This would make no sense:
721
+
722
+ It could be the syntax if the statement for creating a trigger
723
+ where "ALTER TABLE ADD TRIGGER".
724
+
725
+ The statement for creating a trigger is however "CREATE TRIGEER".
726
+
727
+ Consequently the statement for changing a trigger must be "ALTER TRIGGER"
728
+ and not "ALTER TABLE".
729
+
730
+ Switching off all triggers for an individual table at once would be
731
+ convenient of course and can be easily achieved with "ALTER TRIGGER" as well:
732
+ just write a little PL/SQL procedure "disable_triggers()" that takes a
733
+ tablename as input and disables all triggers on it.
734
+
735
+ Christoph Dalitz
736
+
737
+ From pgsql-general-owner+M33790@postgresql.org Thu Nov 28 11:04:17 2002
738
+ Return-path: <pgsql-general-owner+M33790@postgresql.org>
739
+ Received: from postgresql.org (postgresql.org [64.49.215.8])
740
+ by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id gASG4EP11817
741
+ for <pgman@candle.pha.pa.us>; Thu, 28 Nov 2002 11:04:15 -0500 (EST)
742
+ Received: from localhost (postgresql.org [64.49.215.8])
743
+ by postgresql.org (Postfix) with ESMTP
744
+ id 0E622476313; Thu, 28 Nov 2002 11:03:52 -0500 (EST)
745
+ Received: from postgresql.org (postgresql.org [64.49.215.8])
746
+ by postgresql.org (Postfix) with SMTP
747
+ id 153FF476713; Thu, 28 Nov 2002 11:03:36 -0500 (EST)
748
+ Received: from localhost (postgresql.org [64.49.215.8])
749
+ by postgresql.org (Postfix) with ESMTP id 4A4AA475E41
750
+ for <pgsql-general@postgresql.org>; Thu, 28 Nov 2002 11:03:19 -0500 (EST)
751
+ Received: from beamish.nsd.ca (unknown [205.150.156.194])
752
+ by postgresql.org (Postfix) with ESMTP id 30F56475AFF
753
+ for <pgsql-general@postgresql.org>; Thu, 28 Nov 2002 11:03:18 -0500 (EST)
754
+ Received: (from smap@localhost)
755
+ by beamish.nsd.ca (8.9.3/8.9.3) id LAA12283;
756
+ Thu, 28 Nov 2002 11:02:54 -0500
757
+ X-Authentication-Warning: beamish.nsd.ca: smap set sender to <jllachan@nsd.ca> using -f
758
+ Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam)
759
+ id xma012273; Thu, 28 Nov 02 11:02:35 -0500
760
+ Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148])
761
+ by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id LAA00966;
762
+ Thu, 28 Nov 2002 11:01:23 -0500
763
+ Message-ID: <3DE63E3D.5BC92720@nsd.ca>
764
+ Date: Thu, 28 Nov 2002 11:03:09 -0500
765
+ From: Jean-Luc Lachance <jllachan@nsd.ca>
766
+ X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686)
767
+ X-Accept-Language: en
768
+ MIME-Version: 1.0
769
+ To: Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>
770
+ cc: Bruce Momjian <pgman@candle.pha.pa.us>,
771
+ Tino Wildenhain <tino@wildenhain.de>, pgsql-general@postgresql.org
772
+ Subject: Re: [GENERAL] ALTER TRIGGER DISABLE/ENABLE
773
+ References: <200211261853.gAQIrdE00304@candle.pha.pa.us>
774
+ <3DE3CE7B.614EE99E@nsd.ca> <20021128093357.48c9d644.christoph.dalitz@hs-niederrhein.de>
775
+ Content-Type: text/plain; charset=us-ascii
776
+ Content-Transfer-Encoding: 7bit
777
+ X-Virus-Scanned: by AMaViS new-20020517
778
+ Precedence: bulk
779
+ Sender: pgsql-general-owner@postgresql.org
780
+ X-Virus-Scanned: by AMaViS new-20020517
781
+ Status: OR
782
+
783
+ Sementics.
784
+
785
+ The trigger belongs to the table.
786
+ The trigger is not modified.
787
+ The ability of the table being modified to call it is modified.
788
+ Plus, if you want all the triggers on a table to be disabled the ALTER
789
+ TRIGGER is not enough.
790
+
791
+ JLL
792
+
793
+
794
+ Christoph Dalitz wrote:
795
+ >
796
+ > On Tue, 26 Nov 2002 14:41:47 -0500
797
+ > Jean-Luc Lachance <jllachan@nsd.ca> wrote:
798
+ > >
799
+ > > I think thte sintax should be:
800
+ > >
801
+ > > ALTER TABLE DISABLE|ENABLE TRIGGER {trigger name}|ALL
802
+ > >
803
+ > This would make no sense:
804
+ >
805
+ > It could be the syntax if the statement for creating a trigger
806
+ > where "ALTER TABLE ADD TRIGGER".
807
+ >
808
+ > The statement for creating a trigger is however "CREATE TRIGEER".
809
+ >
810
+ > Consequently the statement for changing a trigger must be "ALTER TRIGGER"
811
+ > and not "ALTER TABLE".
812
+ >
813
+ > Switching off all triggers for an individual table at once would be
814
+ > convenient of course and can be easily achieved with "ALTER TRIGGER" as well:
815
+ > just write a little PL/SQL procedure "disable_triggers()" that takes a
816
+ > tablename as input and disables all triggers on it.
817
+ >
818
+ > Christoph Dalitz
819
+
820
+ ---------------------------(end of broadcast)---------------------------
821
+ TIP 5: Have you checked our extensive FAQ?
822
+
823
+ http://www.postgresql.org/users-lounge/docs/faq.html
824
+
0 commit comments