List row level security policies
Details
Only difference between postgres and redshift is they use different table names for RLS policies:
Postgres: pg_policies
Redshift: svv_rls_policy
Examples
if (FALSE) { # has_postgres()
library(DBI)
library(RPostgres)
con <- dbConnect(Postgres())
dbWriteTable(con, "attitude", attitude, temporary = TRUE)
my_policy <- rls_construct_policy(
name = "all_view",
table = "attitude",
command = "SELECT",
using = "(true)"
)
rls_create_policy(con, my_policy)
rls_policies(con)
dbRemoveTable(con, "attitude")
dbDisconnect(con)
}