Re: BUG #13004: PostgreSQL 9.5 policy for table bug?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: digoal(at)126(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13004: PostgreSQL 9.5 policy for table bug?
Date: 2015-04-09 22:16:38
Message-ID: 20150409221638.GE3663@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* digoal(at)126(dot)com (digoal(at)126(dot)com) wrote:
> There is no policy for r3's select command , why cann't see rows?

As documented, if row-level security is enabled on the table and there
is no policy which applies, then a default-deny policy will be used.

If you want there to be no filtering on SELECTs for this user, simply
create a policy with 'true' as the USING clause.

> There is no policy for r3's delete command , why cann't delete?

Same here.

> another nonsuper role , and not owner:
>
> postgres=> \c postgres r1
> You are now connected to database "postgres" as user "r1".
> postgres=# select * from test;
> id | r
> ----+----
> 1 | r1
> 2 | r2
> 4 | r1
> 4 | r2
> 4 | r1
> 4 | r2
> 4 | r1
> 4 | r3
> (8 rows)

Are you sure that r1 isn't a superuser? Certainly, the prompt displayed
above (postgres=#) implies that it is. Further, I'm unable to reproduce
this issue with current master, based on what I understand of the setup.

A self-contained test case, including the exact commands used from the
start, would help immensely.

Thanks!

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-04-10 05:16:35 Re: BUG #13010: After promote postgres try to send old timeline WALs to archive
Previous Message lpoyner 2015-04-09 19:00:29 BUG #13013: Cannot install PostgreSQL