CREATE OR REPLACE FUNCTION msgfailerror() RETURNS trigger AS \' BEGIN IF NEW.noces< new.first_column THEN RAISE EXCEPTION \'cannot have a negative sala
there is nothing wrong with you the only thing is using quotes
please change :
RAISE EXCEPTION 'cannot have a negative salary';
to:
RAISE EXCEPTION ''cannot have a negative salary'';
'' is different from "
'' = two single quotes