Update multiple columns in a trigger function in plpgsql
问题 Given the following schema: create table account_type_a ( id SERIAL UNIQUE PRIMARY KEY, some_column VARCHAR ); create table account_type_b ( id SERIAL UNIQUE PRIMARY KEY, some_other_column VARCHAR ); create view account_type_a view AS select * from account_type_a; create view account_type_b view AS select * from account_type_b; I try to create a generic trigger function in plpgsql, which enables updating the view: create trigger trUpdate instead of UPDATE on account_view_type_a for each row