My dear friends,

I am trying for days to make a function which returns table with various number of columns. Idea is that on provided table name function returns table - but only with columns on which user has select right.

Part where query is generated is done (select col1, col2, ..., colx from table) but I can't accomplish that function returns various number of columns...

Is this possible? Any help?