Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's no need to create a new connection per role.

Simply use `SET ROLE`/`RESET ROLE`.

https://www.postgresql.org/docs/15/sql-set-role.html



It does seem like that adds two round trips (SET ROLE, RESET ROLE) to each database interaction, though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: