Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    6

    Unanswered: Temporary disable trigger

    Hi,

    Is there a way to disable a trigger for transaction?
    I want to disable the trigger for my code but not influence other users.
    The disable for transaction will end at the end of the transaction.

    thanks in advance.

    Jonathan.

  2. #2
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    disable trigger

    no it's not possible but it's in the TODO list:

    Allow triggers to be disabled [trigger]

    maybe in one of the next releases.

    A weird hack would be to drop the trigger and create them after the procedure
    but I would not recommend that
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  3. #3
    Join Date
    Oct 2003
    Posts
    706
    Conceptually, while you may not be able to disable the trigger, you might be able to set up some kind of variable (local to this session) that the trigger can "see." If the variable is set, the trigger .. while it still "fires" .. does nothing.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •