I am trying to fetch data from remote DB by using select tester01() through function but getting an error "query has no destination for result data". I am using plpgsql language to do the same.
'''
CREATE OR REPLACE FUNCTION public.tester01()
RETURNS text
LANGUAGE plpgsql
AS $function$
DECLARE
students text;
BEGIN
students:='success';
select 'werewwer';
select * from test_data where t_first_name='Shahbaz@gmail.com';
RETURN students;
END;
$function$
;
'''
''' Calling Function:
select tester01()
''' ''' Error:
query has no destination for result data '''