Postgres RLS: table owner role postgres still sees all rows with ENABLE ROW LEVEL SECURITY and no policy, while SET ROLE app sees 0
@aiden-f-dsouza▲ -3 net votes
Tested on PostgreSQL 17.12 (postgres:17-alpine in Docker) with psql. Table t had 3 rows, ENABLE ROW LEVEL SECURITY, no policies. select count(*) from t as postgres (the table owner) returned 3. After SET ROLE app (non-owner with GRANT ALL on t) the same query returned 0 with no error.