<DIV><FONT face=Arial size=2>Thanks for the reply, I think I wasn´t too
clear on wot I was intending to do... `</FONT></DIV>
<DIV><FONT face=Arial size=2>here is an example, I hope this
helps..</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Thanks for the reply, I think I wasn´t too
clear on wot I was intending to do... `</FONT></DIV>
<DIV><FONT face=Arial size=2>here is an example, I hope this
helps..</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> I have a Table let´s say tb_test with
admin as the onwer and the only user with all privilege for that
table, I want to create a function that user usr1 has permission to execute.
Within that function all i want to do is to update tb_test, but i get
permission denied for that table when i try to execute the function as
usr1. Basically I want to insert or update a table via a
function restricting insert and update privilege to that
table. I´ve heard that there is a way of setting the privileges to the
level of the onwer of the function, can anyone give be a pratical
example?</FONT></DIV>
<DIV><FONT face=Arial size=2>thanks again</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Iandé</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px;
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color:
black"><B>From:</B> <A title=jhihn(at)paytimepayroll(dot)com
href="mailto:jhihn(at)paytimepayroll(dot)com">Jason Hihn</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=iande(at)br(dot)inter(dot)net
href="mailto:iande(at)br(dot)inter(dot)net">Iande</A> ; <A
title=pgsql-novice(at)postgresql(dot)org
href="mailto:pgsql-novice(at)postgresql(dot)org">pgsql-novice(at)postgresql(dot)org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, August 07, 2003 4:37
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [NOVICE] Function and
Tables Privilege</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=509413519-07082003>So
you want to pull conifential info from a table that has everyone's
confidential info, with no chance of leaking someone
else's?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=509413519-07082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=509413519-07082003>Sounds like a view (or a function and a view) is in
order here... it might be a pain to manage though if you have a alot of
changing SELECTers.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=509413519-07082003></SPAN></FONT> </DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff
2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> <A
href="mailto:pgsql-novice-owner(at)postgresql(dot)org">pgsql-novice-owner(at)postgresql(dot)org</A>
[mailto:pgsql-novice-owner(at)postgresql(dot)org]<B>On Behalf Of
</B>Iande<BR><B>Sent:</B> Thursday, August 07, 2003 3:33 PM<BR><B>To:</B>
pgsql-novice(at)postgresql(dot)org<BR><B>Subject:</B> [NOVICE] Function and Tables
Privilege<BR><BR></DIV></FONT>
<P>Hi guys, </P>
<P> I´m almost sure that this question has been asked before... but
after a 2 days search, I couldn´t find any solutions for it, I´m a noob to
postgres, but manage to install version-7.3.4 no prob, and working fine. So
here goes:</P>
<P>I´m looking for a way to store procedures on the db so that i can only
access data through those, and only grand permissions to the user to
access the procedures and not the tables. I´ve read some stuff about setuid
in this mailing list but could not get it to work. Basically what i need is
to give privilege to the function to access the tables that will be used and
is not granted to the user that executed the function.</P>
<P>Any help will be very much appreciated, even if there is no way of doing
so :)</P>
<P>Thanks</P>
<P>Iandé</P></BLOCKQUOTE></BLOCKQUOTE></FONT></DIV>