Re: safelly erasing dirs/files

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: safelly erasing dirs/files
Дата
Msg-id 4AFF074B.1090105@2ndquadrant.com
обсуждение исходный текст
Ответ на safelly erasing dirs/files  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: safelly erasing dirs/files
Следующее
От: Joao Ferreira gmail
Дата:
Сообщение: Re: safelly erasing dirs/files