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)?
Might need transactions, I'm not sure. I fiddled around with it a bit but it was too much overhead to work with.