0

The function creation was successful, but while executing or calling t, I am getting this error. "Query has no destination for result data"

create or replace function upsert( user_id integer, user_seid uuid, user_nm varchar, user_sta varchar, loc_id integer)
RETURNS integer
Language 'plpgsql'
cost 100
volatile parallel UNSAFE
AS $BODY$
DECLARE err_context text;
BEGIN

SELECT table.other_fun_update_loc(user_seid,loc_id);

If (user_id >0) then Update table
else insert into 
end if;
return 0;
exception 
when others then 
get diagnostics err_context = PG_CONTEXT;
return -1;


END; 
$BODY$;

Getting the "Query has no destination for result data"

SR3599
  • 3
  • 2

0 Answers0