> I needed to do that for the web database that I'm setting up. We
Bruce Momjian <bruce@momjian.us>
> I needed to do that for the web database that I'm setting up. We have > 20000 users and each (potentially) needs a separate database which is > only accessible to them. Rather than having 20000 lines in pg_hba.conf, > I've patched Postgres so that the special token "sameuser" in the > database field of pg_hba.conf allows access only to the username which > is connecting.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/libpq/auth.c | modified | +3 −3 |
| src/backend/libpq/hba.c | modified | +17 −15 |
| src/backend/libpq/pg_hba.conf.sample | modified | +3 −2 |
| src/backend/parser/gram.c | modified | +1 −1 |
| src/include/libpq/hba.h | modified | +3 −3 |