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é
 
 
----- Original Message -----
From: Jason Hihn
To: Iande ; 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?
 
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.
 
-----Original Message-----
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Iande
Sent: Thursday, August 07, 2003 3:33 PM
To: pgsql-novice@postgresql.org
Subject: [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é