Row Level Security Policy question

From: Garry Chen <gc92(at)cornell(dot)edu>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Row Level Security Policy question
Date: 2018-03-12 15:39:50
Message-ID: EF58FF61-E3FF-4217-A935-91A56666CDEF@cornell.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,
I have a question about PostgreSQL row level security policy. Is it passable to have an “and“ condition inside using when create a policy? For example ad following:

CREATE POLICY plc_sec_select_ omb_data ON combo_fc
FOR SELECT TO PUBLIC USING (row_type in (select row_type from sec_select_row_type())
and acct_nbr in (select acct_nbr from sec_select_acct_nbr()));

Garry

Browse pgsql-novice by date

  From Date Subject
Next Message Dale Schmitz 2018-03-12 18:32:46 Re: Error handling
Previous Message Dale Schmitz 2018-03-11 17:05:31 Log in errors