I have built the brand-new PostgreSQL-9.5 (alpha) and I am quite excited about the new feature of row level security. This promises to make multi-role access management quite a bit more straightforward.
As an example, I have so far used a model where a NOLOGIN
role is owner of the database and all tables, views, functions, etc; and then create views to grant appropriate access to specific roles. All good and fine, but the views do proliferate. The new CREATE POLICY
command on tables with ENABLE ROW LEVEL SECURITY
look to be a cleaner alternative to reach the same end.
However, I have so far been unable to determine which tables are RLS-enabled and what policies are defined on them. (All of this after tables and policies have been defined, obviously.) Is there an easy way to identify established policies on RLS-enabled tables?
(There is also the long-awaited UPSERT
and many more jsonb
functions for those of you who are interested, as well as many performance improvements.)