Often while adding a feature to an existing project i have something like ( result of listing the databases )
project_x_001, ..., project_x_00n
I need to clean the database at the end, by dropping all the database that start with a certain pattern, in this case project_x_*
is there any elegant ( cleaner ) to do this in PostgreSQL, beside:
drop database project_x_001, ..., project_x_00n;
the list sometimes is too long, and you would need at each time list the databases and delete a chunk of them