editing functions/triggers etc..

Started by johnfalmost 18 years ago3 messagesgeneral
Jump to latest
#1johnf
jfabiani@yolo.com

Hi,
I was wondering if anyone has written a tool that will drop (cascade) then
allow the edit and then restore the functions/triggers including the adding
the function/triggers to the inserts/deletes/etc.. to the tables.

It turns out that have to change 50 fifty triggers. At the moment I create a
list of the tables -remove the link, edit the code, restore the link. This
is not working very well.

TIA

John

#2Niklas Johansson
spot@tele2.se
In reply to: johnf (#1)
Re: editing functions/triggers etc..

On 24 maj 2008, at 17.03, john wrote:

I was wondering if anyone has written a tool that will drop
(cascade) then
allow the edit and then restore the functions/triggers including
the adding
the function/triggers to the inserts/deletes/etc.. to the tables.

Just use

CREATE OR REPLACE your_trigger_function() RETURNS TRIGGER AS ...

to replace the trigger function in place.

Sincerely,

Niklas Johansson

#3johnf
jfabiani@yolo.com
In reply to: Niklas Johansson (#2)
Re: editing functions/triggers etc..

On Monday 26 May 2008 02:17:59 am Niklas Johansson wrote:

On 24 maj 2008, at 17.03, john wrote:

I was wondering if anyone has written a tool that will drop
(cascade) then
allow the edit and then restore the functions/triggers including
the adding
the function/triggers to the inserts/deletes/etc.. to the tables.

Just use

CREATE OR REPLACE your_trigger_function() RETURNS TRIGGER AS ...

to replace the trigger function in place.

Sincerely,

Niklas Johansson

I'm away at the moment but that thanks it looks to be the solution. Do I feel
dumb!

--
John Fabiani