May 2019
Intermediate to advanced
600 pages
20h 46m
English
This recipe uses RLS, which is available only in PostgreSQL version 9.5 or later, so start by checking that you are not using an older version.
As for the previous recipe, we assume that there is already a schema called someschema and a role called somerole with USAGE privileges on it. We create a new table to experiment with row-level privileges:
CREATE TABLE someschema.sometable3(col1 int, col2 text);
RLS must also be enabled on that table:
ALTER TABLE someschema.sometable3 ENABLE ROW LEVEL SECURITY;
Read now
Unlock full access