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

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)?


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.


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.




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

Search: