News for hackers. Stuff that matters.
Re:PostgreSQL is the worlds’ best database by remus on Friday April 03, 2020 @08:24AM (#22768459)
It also means you need a per-user database connection which isn't feasible in many applications as the recommended number of concurrent connections is typically quite low.
Re:PostgreSQL is the worlds’ best database by chatmasta on Friday April 03, 2020 @08:38AM (#22768549)
Not necessarily. You can SET ROLE at beginning of transaction and DISCARD afterward. This is what postgraphile and postgrest do, for example.
Re:PostgreSQL is the worlds’ best database by remus on Friday April 03, 2020 @04:55PM (#22773866)
Oh cool, I didn't know that. Good to learn!
Re:PostgreSQL is the worlds’ best database by steve-chavez on Friday April 03, 2020 @11:51AM (#22770476)
postgrest actually does a `SET LOCAL ROLE`(transaction scoped, so no need to DISCARD), but yes, that's the gist of it.
Re:PostgreSQL is the worlds’ best database by BenjieGillam on Friday April 03, 2020 @10:07AM (#22769251)
This absolutely isn't required; I think you might be getting confused with RBAC rather than RLS. Handy infosheet: https://learn.graphile.org/docs/PostgreSQL_Row_Level_Securit...
Re:PostgreSQL is the worlds’ best database by devit on Friday April 03, 2020 @08:45AM (#22768622)
You can just change the user for every query.