0

I have a basic function that accepts 3 arguments. 2 in parameters and 1 out parameter.

CREATE OR REPLACE PROCEDURE document_copy(IN p_name character varying, IN p_id smallint, INOUT p_new_id smallint) 

I've tried a couple ways of executing this function but I get this error whichever methods I've tried function document_copy(character varying, smallint) does not exist

I've tried

select  (document_template_copy_one ('Test'::varchar, 1::smallint)).* 

DO $$
DECLARE  
 test SMALLINT;
BEGIN  
    select  dust.document_template_copy_one ('Mexico Passport'::varchar, 1::smallint,  test) into test ;
END $$;

DO $$
DECLARE  
 test SMALLINT;
BEGIN  
    select  dust.document_template_copy_one ('Mexico Passport'::varchar, 1::smallint) into test ;
END $$;

any assistance would be greatly appreciated

Master
  • 2,038
  • 2
  • 27
  • 77
  • 1
    a procedure is no function and must be called with `CALL(dust.document_template_copy_one ('Mexico Passport'::varchar, 1::smallint, test) )` – nbk May 05 '23 at 19:33
  • Does this answer your question? [How to return a value from a stored procedure (not function)?](https://stackoverflow.com/questions/62981538/how-to-return-a-value-from-a-stored-procedure-not-function) – nbk May 05 '23 at 19:35

0 Answers0