I have this code for my table asf with column price and a column category:
CREATE OR REPLACE FUNCTION aft_update()
RETURNS trigger AS
$$
BEGIN
UPDATE asf SET price = new.price='300' WHERE category = 'pro';
RETURN NEW;
END;
$$
LANGUAGE 'plpgsql';
CREATE TRIGGER updt_log
AFTER UPDATE
ON asf
FOR EACH ROW
EXECUTE PROCEDURE aft_update();
but for some reason even though the trigger runs successfully, the update does not work! I want to update multiple rows.
SET price = new.price='300'