Hi 

I want to try using functions but I am having trouble understanding return.

This is the function -
CREATE OR REPLACE FUNCTION p_id.ip_orient_3()
  RETURNS integer AS
$BODY$

 Begin

 Insert into fluids (fluid_id) values ('1') ;

  End;
  $BODY$
  LANGUAGE 'plpgsql' VOLATILE
  COST 100;
ALTER FUNCTION p_id.ip_orient_3() OWNER TO postgres;

This is how I am calling the function -

 select p_id.ip_orient_3();

The error message - "control reached end of function without RETURN"

I have attempted adding - Return integer; to the end of the function with no 
success.

Can anyone help me??

Bob

Reply via email to