Joao Ferreira gmail wrote:
> How can I safelly erase (with rm command in Linux) files or dirs
> concerning a specific database ?
>
You can't do it with rm; you need to execute the SQL "drop" command
somehow to clean up all the references to that database. If you want to
remove a database from the command line, there's a wrapper script named
dropdb you can use to do that:
http://www.postgresql.org/docs/current/static/app-dropdb.html
Note that removing a database will require connecting to the server as a
superuser or owner of the database. If you want to do that in a script,
you might need to setup a .pgpass file:
http://www.postgresql.org/docs/current/static/libpq-pgpass.html
--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com www.2ndQuadrant.com