Error: near line 1: near "IF": syntax error code example Example: ERROR: syntax error at or near "IF" do $$ begin -- code goes here end $$