I have this below function which returns no rows, but no errors as well. Am I missing any statement over here to return the rows?. If I execute the select statement alone I do get results.
CREATE OR REPLACE FUNCTION public.create_new_conversation()
RETURNS TABLE(chat_id text, members jsonb)
LANGUAGE plpgsql
AS $function$
declare
the_record record;
begin
select conversation_id, participants
into the_record
from public.conversations
where conversation_id='123456';
-- return conversationid;
end;
$function$