I have created below trigger and function for update on function where I want to exclude trigger execution when there are update on two columns 'frm' and 'upto' which are of type "timestamp without time zone"
In trigger function I am checking for updates on these two columns
CREATE OR REPLACE FUNCTION ff() RETURNS TRIGGER AS $$
if((old."frm" == New."frm") and (old."upto" == New."upto") ) then
insert into TG_TABLE_NAME (select * from inserted );
New."from" := old."from";
NEW."upto" := current_timestamp;
END $$ LANGUAGE plpgsql;
create trigger update_trig2 after update on dd
for each row execute procedure ff();`
The comparison operator is
= in SQL and PL/pgSQL.
So you need to replace