Skip site navigation (1) Skip section navigation (2)

Re: Enable/disable trigger path

From: Dave Page <dpage(at)postgresql(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Enable/disable trigger path
Date: 2007-01-16 08:39:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Guillaume Lelarge wrote:
> Hi all,
> Here is my first patch to support enable/disable trigger. This
> functionnality is available since release 8.1 of PostgreSQL. Im' not
> really happy with my code. I have some code to enable a trigger and some
> code to disable it. I think it would be better to merge them since they
> are pretty close. For example, I use two menus (Enable trigger and
> Disable trigger). It would be better to use just one but I don't know
> what to do :
>  * rename the menu's title
>  * use a checked menu.
> Or perhaps two menus are just fine. Any advice on this ?
> Also, I would like to add enable/disable all triggers but I don't know
> where I should put the menu item : on the table name's contextual menu ?
> on the "Triggers" contextual menu ?
> Thanks for any tips on this matter.

Bullet pointed tips, purely because that's how they escaped from my
brain :-)

- This should be on the Tools menu, not the View menu.

- Use a single factory, and a check/uncheck menu option. See the changes
I made to the pg_stattuple stuff as an example of a check option.

- The menu option should probably become something like 'Trigger enabled?'

- pgTrigger::Enable/DisableTrigger should manage the state of the
enabled flag themselves - you should not have to change that from the

- If Enable/Disable trigger don't work for some reason, StartDialog
should exit without doing anything else as a general rule.

Otherwise it looks OK though - certainly looks like you've got the hang
of the factories :-)

Regards, Dave.

In response to


pgadmin-hackers by date

Next:From: Dave PageDate: 2007-01-16 09:16:44
Subject: Re: DB restrict patch of connection
Previous:From: Guillaume LelargeDate: 2007-01-16 08:05:59
Subject: Enable/disable trigger path

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group