Created
June 23, 2011 08:28
-
-
Save bobagold/1042152 to your computer and use it in GitHub Desktop.
Happy debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE FUNCTION fup_department_del() RETURNS TRIGGER AS ' | |
| BEGIN | |
| IF NEW.f_deleted=1 THEN | |
| DELETE FROM department WHERE id=NEW.id; | |
| END IF; | |
| RETURN NEW; | |
| END; | |
| ' LANGUAGE 'plpgsql'; | |
| CREATE TRIGGER tup_department AFTER UPDATE ON department | |
| FOR EACH ROW EXECUTE PROCEDURE fup_department_del(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment