Re: [SQL] Preventing Deletions with triggers

2004-05-21 Thread Tom Lane
Jeff Post <[EMAIL PROTECTED]> writes: > CREATE or replace FUNCTION person_fake_delete() RETURNS TRIGGER AS ' > BEGIN > OLD.status := 1; -- This does the fake deletion > RETURN NULL; -- I thought this would prevent the delete from > actually happening. > END; > ' LANGUA

Re: [SQL] Preventing Deletions with triggers

2004-05-21 Thread Manuel Sugawara
Jeff Post <[EMAIL PROTECTED]> writes: > Here is what I got: > > CREATE or replace FUNCTION person_fake_delete() RETURNS TRIGGER AS ' > BEGIN > OLD.status := 1; -- This does the fake deletion > RETURN NULL; -- I thought this would prevent the delete from > actually happenin

Re: [SQL] Preventing Deletions with triggers

2004-05-21 Thread Achilleus Mantzios
O kyrios Jeff Post egrapse stis May 19, 2004 : > I would like to have a trigger that fires whenever a delete is attempted. > The trigger should update the status field of the tupple (to remove the > tupple form the active set of tupples). > A rule would be more appropriate for this task. > >

[SQL] Preventing Deletions with triggers

2004-05-21 Thread Jeff Post
I would like to have a trigger that fires whenever a delete is attempted. The trigger should update the status field of the tupple (to remove the tupple form the active set of tupples). Here is what I got: CREATE or replace FUNCTION person_fake_delete() RETURNS TRIGGER AS ' BEGIN OLD