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

    Unanswered: to Restrict some Statements for some Users

    In PostgreSQL, is there a way to prevent some users from changing anything in a Database but only have read priviliges.

    For example a specific user can execute SELECT statements but can not execute a UPDATE, INSERT or DELETE statement.

    Is it possible?

  2. #2
    Join Date
    Feb 2005
    Colorado Springs
    Yes, user privileges can be restricted. In fact, you can create a Group that has certain privileges and then assign the user to a group. That way, you don't have to individually assign the privileges per user. A nice administrative interface that has a detailed user privileges feature is PG Lightning Admin.

  3. #3
    Join Date
    Jun 2004
    Arizona, USA
    Another common approach: You can add views on the tables, allow all the users access to the views, and prohibit access to the underlying tables to most groups. Views are read-only.
    "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

Posting Permissions

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