Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Simon Pills: "Someone finally invented an intuitively used and easily customized PostgreSQL database administration tool! Keep up the good work. I will be in touch. I am able to do this horrendous work because your software enabled me to create a new database with all necessary objects in several minutes! I am sure that I have found what I really need".
Armin Braunstein: "Also I must say, that your PostgreSQL Maestro tool is the best tool for PostgreSQL I have seen. For general I am really happy about the tool and how it works".

More

Add your opinion

PostgreSQL Maestro online Help

Prev Return to chapter overview Next

Row Security Policies

Row Security Policies have been implemented in PostgreSQL 9.5. They allow you to restrict, on a per-user basis, which rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. Note that row-level security must be enabled on the table (using ALTER TABLE ... ENABLE ROW LEVEL SECURITY) in order for created policies to be applied.

 

 

Command

The command to which the policy applies. Valid options are ALL, SELECT, INSERT, UPDATE, and DELETE. ALL is the default.

 

Roles

The role(s) to which the policy is to be applied. The default is PUBLIC, which will apply the policy to all roles.

 

Using Expression

Any SQL conditional expression (returning boolean). This expression will be added to queries that refer to the table if row level security is enabled. Rows for which the expression returns true will be visible. Any rows for which the expression returns false or null will not be visible to the user (in a SELECT), and will not be available for modification (in an UPDATE or DELETE).

 

Check Expression

Any SQL conditional expression (returning boolean). This expression will be used in INSERT and UPDATE queries against the table if row level security is enabled. Only rows for which the expression evaluates to true will be allowed.



Prev Return to chapter overview Next