I've tried this trigger using PgAdmin4; (this GUI i think have some bugs)
my trigger is:
CREATE TRIGGER name_update BEFORE UPDATE ON customer
FOR EACH ROW
BEGIN
SET NEW.name = CONCAT_WS(', ', NEW.lastname, NEW.firstname);
END;
CREATE TRIGGER name_insert BEFORE INSERT ON customer
FOR EACH ROW
BEGIN
SET NEW.name = CONCAT_WS(', ', NEW.lastname, NEW.firstname);
END;
but i'm getting this error:
i've tried remove begin and end, but nothings happens, maybe must I to try on the shell, or in txt file? what is the best way to do it outside pgadmin and manage the carriage returns, in mysql i've used to use delimeter on the shell.