Re: Row-based authorization

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Thiago Silva <thiago(dot)silva(at)kdemail(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, metal <marcelometal(at)gmail(dot)com>, marcos(dot)renan(at)gmail(dot)com
Subject: Re: Row-based authorization
Date: 2006-12-05 22:25:01
Message-ID: 20061205222501.GA10873@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 05, 2006 at 12:52:15 -0200,
Thiago Silva <thiago(dot)silva(at)kdemail(dot)net> wrote:
>
> I was wondering if PostgreSQL authorization rules can be aplied on
> specific rows of a given table. I mean, AFAIK the GRANT statement
> cannot be used for such purpose.

You can do this kind of thing using a view that joins a column in the
table to current_user. You would probably want some other table which
maps something in this extra column to authorized users (unless each
row is only going to be accessible to one user).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike G 2006-12-05 22:31:54 Re: Speed of postgres compared to ms sql, is this
Previous Message Ragnar 2006-12-05 22:14:42 Re: [ANNOUNCE] PostgreSQL 8.2 Now Available