Indicate disabled triggers in \d
От | Brendan Jurd |
---|---|
Тема | Indicate disabled triggers in \d |
Дата | |
Msg-id | 37ed240d0611051944q36dddf70xe8d60ccff422cddb@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Indicate disabled triggers in \d
|
Список | pgsql-hackers |
Hello hackers, I noticed that the table description given by \d <tablename> in psql does not indicate whether a trigger is enabled or disabled. In my opinion, if a trigger is disabled, that fact is essential information that a person looking at the output of \d would want to know. I would like to add this feature (and am happy to provide a patch), and I'd like your input on how it should be displayed. My first impulse was to just append a " (disabled)" after each disabled trigger, but perhaps that is not visually obvious enough, especially if the table has many triggers on it. Triggers: y AFTER DELETE ON x FOR EACH ROW EXECUTE PROCEDURE do_something() z BEFORE INSERT ON x FOR EACH ROW EXECUTEPROCEDURE input_stuff() (disabled) You could make it more clear by putting the disabled notice on a separate line with another level of indentation, but could look very messy with lots of triggers on the table: Triggers: y AFTER DELETE ON x FOR EACH ROW EXECUTE PROCEDURE do_something() z BEFORE INSERT ON x FOR EACH ROW EXECUTEPROCEDURE input_stuff() - disabled At the moment my preference is for disabled triggers to be shown as a separate footer section, like so: Triggers: y AFTER DELETE ON x FOR EACH ROW EXECUTE PROCEDURE do_something() Disabled triggers: z BEFORE INSERT ON x FOR EACH ROW EXECUTE PROCEDURE input_stuff() I think this provides the best clarity, and has the added bonus of leaving the trigger definition intact. Thanks for your time, BJ
В списке pgsql-hackers по дате отправления: