How do you do dynamic full search? I have this, but tableName is not a type and I don't think tsvector("*") is possible.
create or replace function searchDB(tableName text, recherche text) -- 1
returns setof tableName
as $$
select *
from tableName
where to_tsvector("*") @@ to_tsquery(recherche);
$$ language plpgsql;