Returning an empty table

Asked

Viewed 90 times

0

create function teste( teste varchar ) returns setof record AS $$
begin

    execute teste;
    return ;
end;
$$ language plpgsql;

select teste ('select * from public.opcional  ');

This returning me record with nothing as I do to appear all data from the optional table?

  • 1

    Could you explain your problem better? If you only want the data from Table select * from public..

  • 1

    What is the purpose of making a function to execute an SQL?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.