Re: Function and Tables Privilege - Mailing list pgsql-novice

From Iande
Subject Re: Function and Tables Privilege
Date
Msg-id E19krLY-0005vj-Ta@mail5.br.inter.net
Whole thread Raw
In response to Function and Tables Privilege  (Iande <iande@br.inter.net>)
Responses Re: Function and Tables Privilege
List pgsql-novice
Thanks for the reply, I think I wasn´t too
clear on wot I was intending to do... `
here is an example, I hope this
helps..
 

Thanks for the reply, I think I wasn´t too
clear on wot I was intending to do... `
here is an example, I hope this
helps..
 
 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?
thanks again
 
Iandé
 
 
<BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px;
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
----- Original Message -----
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color:
black">From: <A title=jhihn@paytimepayroll.com
href="mailto:jhihn@paytimepayroll.com">Jason Hihn
To: <A title=iande@br.inter.net
href="mailto:iande@br.inter.net">Iande ; <A
title=pgsql-novice@postgresql.org
href="mailto:pgsql-novice@postgresql.org">pgsql-novice@postgresql.org

Sent: Thursday, August 07, 2003 4:37
PM
Subject: RE: [NOVICE] Function and
Tables Privilege

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
class=509413519-07082003> 
<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
class=509413519-07082003> 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff
2px solid; MARGIN-RIGHT: 0px">
<FONT face=Tahoma
size=2>-----Original Message-----From: <A
href="mailto:pgsql-novice-owner@postgresql.org">pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of
IandeSent: Thursday, August 07, 2003 3:33 PMTo:
pgsql-novice@postgresql.orgSubject: [NOVICE] Function and Tables
Privilege
Hi guys,
  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:
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.
Any help will be very much appreciated, even if there is no way of doing
so :)
Thanks
Iandé

pgsql-novice by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Function and Tables Privilege
Next
From: Iande
Date:
Subject: Re: Function and Tables Privilege