Re: Can row level security policies also be implemented for views?

From: Caleb Meredith <calebmeredith8(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can row level security policies also be implemented for views?
Date: 2015-12-02 22:59:30
Message-ID: CABFpK63wXqXeWO=o16WuRu0YARva=x=WY_b-yUXtBWdNydpE0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

What is an SRF?

On Wed, Dec 2, 2015 at 5:46 PM Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:

> On 11/25/15 7:40 AM, Stephen Frost wrote:
> >> It seems easy conceptually, RLS just adds a WHERE clause to queries if
> I'm
> >> >not mistaken, and conceptually a view is just a query. The CURRENT_USER
> >> >issue is valid, but personally it's not too big for me as most auth is
> done
> >> >through database parameters.
> > The hard part is making sure that what happens when there are policies
> > on views actually makes sense and works as users expect.
>
> Could this potentially be worked around by having a view that pulls from
> an SRF? Possibly an SRF that's using a dynamically constructed query?
> --
> Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
> Experts in Analytics, Data Architecture and PostgreSQL
> Data in Trouble? Get it in Treble! http://BlueTreble.com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2015-12-02 23:01:14 Re: Can row level security policies also be implemented for views?
Previous Message Jim Nasby 2015-12-02 22:46:11 Re: Can row level security policies also be implemented for views?