Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-6035

Allow compound filters in POLICY

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 15.0.1, 16.0
    • None
    • Query Engine
    • None
    • Undefined

    Description

      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?

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            alfborge Alf Lervåg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: