-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
Undefined
The documentation isn't quite good as I see different ways of doing this documented. None of them seem to work for me however.
To reproduce, see TEIID-6036 where I describe my setup.
According to the Permissions page, I should be able to do this:
CREATE POLICY limit_on_account_ids ON public.ACCOUNT FOR SELECT TO user_role USING ('ACCOUNT_ID > 19980002 and ACCOUNT_ID < 19980012');
The result for me is that no policy is applied.
According to data roles I should be able to do this:
CREATE POLICY limit_on_account_ids
ON public.ACCOUNT
FOR SELECT
TO user_role USING (ACCOUNT_ID > 19980002 and ACCOUNT_ID < 19980012);
This errors out because the SQL parser doesn't expect the and in the USING clause. This aligns with the BNF for SQL Grammar.
Am I missing something?