pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedRLS bug?
3+ messages / 2 participants
[nested] [flat]
* RLS bug?
@ 2015-01-06 21:52 Peter Geoghegan <pg@heroku.com>
2015-01-07 20:35 ` Re: RLS bug? Stephen Frost <sfrost@snowman.net>
2015-01-29 02:57 ` Re: RLS bug? Stephen Frost <sfrost@snowman.net>
0 siblings, 2 replies; 3+ messages in thread
From: Peter Geoghegan @ 2015-01-06 21:52 UTC (permalink / raw)
To: pgsql-bugs; +Cc: Stephen Frost <sfrost@snowman.net>
Example session, from master branch:
postgres=# create table rowtest (key int4 primary key, val text);
CREATE TABLE
postgres=# alter table rowtest enable row level security;
ALTER TABLE
postgres=# create role bob;
CREATE ROLE
postgres=# CREATE POLICY test ON rowtest
FOR INSERT
TO bob
WITH CHECK (key % 3 = 0 );
CREATE POLICY
postgres=# CREATE POLICY test2 ON rowtest
FOR UPDATE
TO bob
WITH CHECK (key % 2 = 0 );
CREATE POLICY
postgres=# \d rowtest
Table "public.rowtest"
Column | Type | Modifiers
--------+---------+-----------
key | integer | not null
val | text |
Indexes:
"rowtest_pkey" PRIMARY KEY, btree (key)
Policies:
POLICY "test" FOR INSERT
TO bob
WITH CHECK ((key % 3) = 0)
POLICY "test2"
TO bob
WITH CHECK ((key % 2) = 0)
Why is the policy "test2" not listed as applying only "FOR UPDATE"? If
this is the intended behavior, it is not consistent with the
documentation, which states: "Using UPDATE for a policy means that it
will apply to UPDATE commands".
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: RLS bug?
2015-01-06 21:52 RLS bug? Peter Geoghegan <pg@heroku.com>
@ 2015-01-07 20:35 ` Stephen Frost <sfrost@snowman.net>
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Frost @ 2015-01-07 20:35 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: pgsql-bugs
Peter,
* Peter Geoghegan (pg@heroku.com) wrote:
> Why is the policy "test2" not listed as applying only "FOR UPDATE"? If
> this is the intended behavior, it is not consistent with the
> documentation, which states: "Using UPDATE for a policy means that it
> will apply to UPDATE commands".
Yeah, that looks like an issue.. I'll look into it.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: RLS bug?
2015-01-06 21:52 RLS bug? Peter Geoghegan <pg@heroku.com>
@ 2015-01-29 02:57 ` Stephen Frost <sfrost@snowman.net>
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Frost @ 2015-01-29 02:57 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: pgsql-bugs
Peter,
* Peter Geoghegan (pg@heroku.com) wrote:
> Why is the policy "test2" not listed as applying only "FOR UPDATE"? If
> this is the intended behavior, it is not consistent with the
> documentation, which states: "Using UPDATE for a policy means that it
> will apply to UPDATE commands".
It wasn't intentional and I had been meaning to get to it, but Tom beat
me to it. master now handles this correctly.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2015-01-29 02:57 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 21:52 RLS bug? Peter Geoghegan <pg@heroku.com>
2015-01-07 20:35 ` Stephen Frost <sfrost@snowman.net>
2015-01-29 02:57 ` Stephen Frost <sfrost@snowman.net>
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