-- trigger function
drop function if exists jobs_tech_mtstamp() cascade;
create function jobs_tech_mtstamp() returns trigger as $$
begin
	new.tech_mtstamp = now();
	return new;
end;
$$ language plpgsql;
comment on function jobs_tech_mtstamp() is 'trigger on jobs - update tech_mtstamp field';

create trigger jobs_tech_mtstamp_trigger before insert or update on jobs
	for each row execute procedure jobs_tech_mtstamp();

comment on trigger jobs_tech_mtstamp_trigger on jobs is 'auto-update tech_mtstamp trigger on jobs';
