title: Returning column value after insert into table and set it into a variable
body: <pre><code>CREATE TABLE footable(id integer, sometext text);
  
  CREATE OR REPLACE FUNCTION foofunction()
  RETURNS VOID AS $$
  DECLARE
  id_parameter integer;
  BEGIN
  INSERT INTO footable(sometext) VALUES('footext') RETURNING id;
  id_parameter:=id;
  PERFORM call_foo_function(id_parameter);
  END LANGUAGE plpgsql VOLATILE;
  </code></pre>
  
  <p>This code doesn't work.</p>
  
  <p>How can i get returning id and set it to id_parameter variable so that use it in call_foo_function(id_parameter) as parameter.</p>