KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this Trigger in Postgresql that I can't just get to work (does nothing). For understanding, there's how I defined it: CREATE TABLE documents ( ... modification_time timestamp with time zone DEFAULT now() ); CREATE FUNCTION documents_update_mod_time() RETURNS trigger AS $$ begin new.modification_time := now(); return new; end $$ LANGUAGE plpgsql; CREATE TRIGGER documents_modification_time BEFORE INSERT OR UPDATE ON documents FOR EACH ROW EXECUTE PROCEDURE documents_update_mod_time(); Now to make it a bit more interesting.. How do you debug triggers?
Tags (comma-separated)
Save Edits
Cancel