News for hackers. Stuff that matters.
Re:Row Level Security with PostgreSQL 9.5 by agopaul on Wednesday April 20, 2016 @03:00PM (#11536841)
This is interesting, but wouldn't that require to create a postgres user for each customer (and then use that user to make the connection to the DB)?
Re:Row Level Security with PostgreSQL 9.5 by kyllo on Wednesday April 20, 2016 @07:50PM (#11538624)
Something like this has been done, and web app frameworks have had libraries that do it--only with schemas instead of users--for quite some time.
Re:Row Level Security with PostgreSQL 9.5 by barsonme on Wednesday April 20, 2016 @03:24PM (#11537027)
IIRC you can `SET ROLE = ...`, query, `RESET ROLE` and be done with it.

Might need transactions, I'm not sure. I fiddled around with it a bit but it was too much overhead to work with.