Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

CREATE POLICY IN SQL

CREATE TABLE accounts (manager text, company text, contact_email text);

ALTER TABLE accounts ENABLE ROW LEVEL SECURITY;

CREATE POLICY account_managers ON accounts TO managers
    USING (manager = current_user);
Source by www.postgresql.org #
 
PREVIOUS NEXT
Tagged: #CREATE #POLICY #IN #SQL
ADD COMMENT
Topic
Name
8+3 =