pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: digoal@126.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13004: PostgreSQL 9.5 policy for table bug?
Date: Thu, 9 Apr 2015 18:16:38 -0400
Message-ID: <20150409221638.GE3663@tamriel.snowman.net> (raw)
In-Reply-To: <20150409024355.26380.72252@wrigleys.postgresql.org>
References: <20150409024355.26380.72252@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

* digoal@126.com (digoal@126.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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (2+ messages)

Message-ID: <20150409221638.GE3663@tamriel.snowman.net>
Permalink:  ../20150409221638.GE3663@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20150409221638.GE3663@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: sfrost@snowman.net, digoal@126.com
  Subject: Re: BUG #13004: PostgreSQL 9.5 policy for table bug?
  In-Reply-To: <20150409221638.GE3663@tamriel.snowman.net>
  References: <20150409024355.26380.72252@wrigleys.postgresql.org> <20150409221638.GE3663@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox