We need to implement row-level security policy for a PostgreSQL View. Is there any option to do this?
Thank You
CREATE VIEW
view_own_log
AS SELECT
these,
fields,
only
FROM
restricted_log_table
WHERE
username=user;
user
is the logged on user.
You can create more sophisticated WHERE
clauses if needed. Have the table access limited to minimum and use GRANT
to give access to the view.