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

  • 4
    Why no simply allow access to all databases through pg_hba.conf but remove the connect privilege through SQL for the users and databases in question? – a_horse_with_no_name Apr 4 '18 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.