Basically, it tells you that each row is independent in regard of row-level security.
Consider the table below:
+---------------------+----------------+
| field1 | field2 |
+---------------------+----------------+
| value1 | 1 |
| value1 | 2 |
| value1 | 3 |
| value2 | 4 |
+---------------------+----------------+
There are several (permissive) policies:
field1 = 'value1'
field1 = 'value2'
- SUM(field2)> 10 (forbidden but let us imagine for now that you could define it)
You were granted policies #2 and 3 so you can see and update the last record only.
... Until you execute UPDATE table SET value2 = 11
.
This is really bad in terms of:
- Security. You can "grant yourself" access to records, as a user (not as an admin).
- Maintenance. Records would keep appearing/disappearing randomly in such database.
- Performance. Such policy would have a very big cost to evaluate.
Interstingly, you can define policies as MyField IN (SELECT MyOtherField FROM MyOtherTable)
, in which case it all relies on what you defined on MyOtherTable
(it is intended to be used with FK/PK).