Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006

    Unanswered: Problems with granting execution to another user

    I have the folowing problem:
    User A creates a table T and a Function F that inserts some data in table T. Then user A removes all privileges from user B on table T, but grants execute on function F. Now, user B can't do SELECT, INSERT, UPDATE nor DELETE on T, but can insted call F to insert some data in T.
    When user B calls F i get the error that user B has no privileges to do an INSERT into T. (In F there is an INSERT INTO T).

    Is there a way to solve this, exept by giving permisions to B to do INSERT on T?
    Can B call F, but run it with user A priviledges?

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    what version of PostgreSQL ?
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

  3. #3
    Join Date
    Oct 2006
    I got the answer on another forum. The function must have SECURITY DEFINER so it can run with the priviledges of the owner.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts