PGMyadmin create trigger, syntax error neat BEGIN

Well I am trying to create a trigger, but it seems that using PGMyadmin’s SQL command prompt wont work, it shows syntax error all the time:


CREATE TRIGGER trigger_name BEFORE INSERT ON table_name
    FOR EACH ROW
    BEGIN
        // Code inside
    END;

Anyone knows how to fix this problem? I have absolutely no idea why this syntax error appears:

ERROR: syntax error at or near “BEGIN”
LINE 3: BEGIN
^

i would start by looking up the CREATE TRIGGER syntax in da manual –

Yeah I made sure to check the syntax and found nothing wrong with it.

From the manual, it seems a TRIGGER can ONLY execute a function in PostgresSQL

CREATE TRIGGER creates a new trigger. The trigger will be associated with the specified table and will execute the specified function funcname when certain events occur.

Well the Manual says that its possible to use FOR EACH ROW statement, weird.

Yes, but following that must be EXECUTE funcname (arguments) not BEGIN