title: Postgres error [42883] and [42601] while executing stored procedure from trigger
body: <p>I want to create a trigger which will execute a stores procedure which will update few rows. Procedure works when I test it using <strong>Call</strong> method  but the  trigger can not find it with error that function does not exists. 
  Here is my procedure </p>
  
  <pre><code>create or replace PROCEDURE update_reg_location(latitude text, longitude text,userid int)
  LANGUAGE SQL
  AS $$
  update users set reg_lat=latitude , reg_lon=longitude where id =userid
  $$;
  </code></pre>
  
  <p>When I use </p>
  
  <pre><code>call update_reg_location('123','234',1)
  </code></pre>
  
  <p>from IDE its works fine and record is updated but when i use it in trigger it wont compile.</p>
  
  <pre><code>CREATE TRIGGER update_reg_location
      after INSERT ON users
      FOR EACH ROW
      EXECUTE PROCEDURE update_reg_location('123','234',1);
  </code></pre>
  
  <p>Also getting error when I want to get new value of the inserted row like this</p>
  
  <pre><code>CREATE TRIGGER update_reg_location
      after INSERT ON users
      FOR EACH ROW
      EXECUTE PROCEDURE update_reg_location(new.lat,new.lon,1);
  </code></pre>
  
  <p>getting error as <strong>syntax error at or near new.</strong> (new.lat,new.lon,1); in this line</p>