4 ms·
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)?
by agopaul 10y ago
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)?
- barsonme 10y agoIIRC 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.
- kyllo 10y agoSomething 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.