The query hit the database, but one row never appeared. That was the point. Least Privilege Row-Level Security stops anyone from seeing more than they are allowed, and it enforces it at the data layer.
Least privilege means granting only the minimum access needed to perform a job. Row-Level Security applies this principle to individual rows in a table. The database evaluates every request, checking the identity and roles of the user before returning data. Unauthorized rows are filtered out, even if the query is broad. This eliminates exposure without relying on application code alone.
Implementing Least Privilege Row-Level Security starts with defining clear access policies. Each policy should bind permissions to specific conditions: user ID matches, group membership, or business logic. In PostgreSQL, CREATE POLICY and ALTER TABLE with ENABLE ROW LEVEL SECURITY make it happen. In SQL Server, security predicates achieve the same outcome.