ERROR: column "FLAT" does not exit. Line 1. SELECT UPPER(FLAT). Kindly fix the trigger
The updated or inserted row is referenced using the new record:
CREATE OR REPLACE FUNCTION trigger_fct_tri_sv_tab_temp() 
RETURNS trigger 
AS 
$BODY$
BEGIN
  new.FLAT := UPPER(new.FLAT);
  RETURN NEW;
end
$BODY$
 LANGUAGE plpgsql
 SECURITY DEFINER;