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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: