<P>Well, a view is the easiest thing, grant permissions to the view
and<BR>revoke them from the base table.<BR><BR>However, if you actually want
functions, you should be able to say<BR>something like:<BR><BR>create table
testtable(a text, b int);<BR>create function gettesttable() returns setof
testtable as ' select * from<BR>testtable where a = SESSION_USER;' language
'SQL' security definer;<BR><BR>This example is one that really would make
more sense as a view, but<BR>imagine that the function was plpgsql and
actually did something<BR>interesting.<BR><BR>What have you tried so
far?<BR>----------------------</P>
<P>What I was thinking, would be something on the line of enable privilege
at the begining of the function and disable privilege and the end to restore
the currente_user privileges, from wot i understand, this way the function
would execute with it´s onwer´s privileges.</P>
<P>would it not be advisable not to use a view?.. i want to insert into a
table via a function, so that, i can only access the especific table through
the functions parameters. is this any clear?</P>
<P>thanks once again</P>
<P>Iandé</P>
<P> </P>
<P> </P>