Re: more RLS oversights

From: Joe Conway <joe(dot)conway(at)crunchydata(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: more RLS oversights
Date: 2015-07-10 22:08:53
Message-ID: 55A04275.5000403@crunchydata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/03/2015 10:03 AM, Noah Misch wrote:
> (1) CreatePolicy() and AlterPolicy() omit to call assign_expr_collations() on
> the node trees. Test case:
>
> begin;
> set row_security = force;
> create table t (c) as values ('bar'::text);
> create policy p on t using (c < ('foo'::text COLLATE "C"));
> alter table t enable row level security;
> table pg_policy; -- note ":inputcollid 0"
> select * from t; -- ERROR: could not determine which collation ...
> rollback;

The attached fixes this issue for me, but I am unsure whether we really
need/want the regression test. Given the recent push to increase test
coverage maybe so. Any objections?

Joe

Attachment Content-Type Size
rls-assign_expr_collations.diff text/x-diff 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-07-10 23:26:39 Re: pg_upgrade + Extensions
Previous Message Peter Geoghegan 2015-07-10 22:05:21 Reusing abbreviated keys during second pass of ordered [set] aggregates