Re: more RLS oversights - Mailing list pgsql-hackers

From Joe Conway
Subject Re: more RLS oversights
Date
Msg-id 55A04275.5000403@crunchydata.com
Whole thread Raw
In response to Re: more RLS oversights  (Noah Misch <noah@leadboat.com>)
List 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

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: more RLS oversights
Next
From: Pavel Stehule
Date:
Subject: Re: polymorphic types - enforce casting to most common type automatically