createfunctiontr_OldInventory()returnsTriggeras$$begininsertintoregistro_inventory(inventory_id,film_id,store_id,fecha)values(old.inventory_id,old.film_id,old.store_id,old.last_update);returnnew;end$$languageplpgsql;createtriggerinventory_updateafterupdateoninventoryforeachrowexecuteproceduretr_OldInventory();updateinventorysetfilm_id=2whereinventory_id=2/*Comprobacion del UPDATE*/select*frominventorywhereinventory_id=2select*fromregistro_inventory