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;
This code doesn't work.
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.