Section6 Triggers Security
Section6 Triggers Security
REFERENCING
OLD TABLE AS OldStuff,
NEW TABLE AS NewStuff
REFERENCING
OLD TABLE AS OldStuff,
NEW TABLE AS NewStuff
NEW.last_date := current_timestamp;
NEW.last_user := current_user;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
Creating the trigger
CREATE TRIGGER emp_stamp
BEFORE INSERT OR UPDATE ON emp