In PostgreSQL sometimes we replace a database, we rename the old when a create a new one, example:
- Database: test
- Rename database to: test-04-04 (date)
- Create a newdatabase: test
Now we have a lot of databases named : test-"date" and its becoming hard to add database at pg_hba every time, is there a way to allow all database start with test
like test*
?
pg_hba.conf
but remove the connect privilege through SQL for the users and databases in question?