Search Postgresql Archives

Need help using function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux