Re: GRANT access rights on rows

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-novice(at)postgresql(dot)org, Andrew Chambers <andychambers2002(at)yahoo(dot)co(dot)uk>
Subject: Re: GRANT access rights on rows
Date: 2006-01-05 09:03:38
Message-ID: 20060105090338.GA7321@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Jan 05, 2006 at 09:53:52 +0100,
"A. Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> wrote:
> am 05.01.2006, um 2:42:31 -0600 mailte Bruno Wolff III folgendes:
> > > I believe the conventional method of doing this is to create a view
> > > selecting all the rows you wish to make accessable, then to grant access
> > > to the view.
> >
> > And note that the view can use current_user which may be useful if different
> > users are supposed to see different rows.
>
> Can you explain this with a simple example?

For example you might include a user name as a column of a table and then
have a view that lets users only see rows where the username in a row
matches current_user.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Roland Giesler 2006-01-05 10:50:09 Re: Best way to manage users
Previous Message A. Kretschmer 2006-01-05 08:53:52 Re: GRANT access rights on rows