I would like to create a function that operates on a table, for example
create or replace function test(t table)
returns void language plpgsql as
$func$
begin
select * from t limit 10;
end;
$func$
Then, I can call the function with any tablename, e.g.
select test(myTable);
How would I do something like this?
returns voidand a syntactically incorrectSELECTdon't make sense. And always your version of Postgres. I think there is a solution.