1 year ago

#316947

test-img

Samuel Wright

I have an error in Postgresql building a trigger and cannot seem to find a solution

I am working in PGAdmin4, learning postgresql (yes, I am still green to this), and trying to build a trigger for a project.

Everything seems to be working well until I get to the create trigger:

CREATE OR REPLACE TRIGGER Mail_List_upd 
BEFORE UPDATE
ON Mail_List
FOR EACH ROW
EXECUTE PROCEDURE Mail_List_upd_func();

When I execute this, in addition to the rest of my code, I get the following error:

ERROR:  syntax error at or near "CREATE"
LINE 73: CREATE OR REPLACE TRIGGER Mail_List_upd
         ^
SQL state: 42601
Character: 1824

I have gone through all the work and everything looks good. I as curious if this might be a dialect issue, but that does not seem to be it. I looked up another person's work on github and tried it and saw the same error. So I am at a loss.

postgresql-14

0 Answers

Your Answer

Accepted video resources