As I tried to make a function for this percent calculation I fell over
the problem of passing a table to the function. I'd like to make this
function:
create function NumRows(table) returns int4
as 'select count(*) from $1'
language 'sql';
Is this possible?