Re: Problem Dropping a Database with users connected to it

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Problem Dropping a Database with users connected to it
Дата
Msg-id 20050114165824.GA26228@wolff.to
обсуждение исходный текст
Ответ на Problem Dropping a Database with users connected to it  (Eric Dorland <eric.dorland@mcgill.ca>)
Ответы Re: Problem Dropping a Database with users connected to it
Список pgsql-general
On Fri, Jan 14, 2005 at 11:16:16 -0500,
  Eric Dorland <eric.dorland@mcgill.ca> wrote:
>
> * Disconnecting all other users before dropping the db, but that doesn't
> seem possible (I could start and stop the db, but that doesn't stop any
> clients from just reconnecting right away).

You could use an alter pg_hba.conf file while doing the drop.

> * Just drop all the tables, etc. instead of dropping the db. There
> doesn't seem to be a good way to do this except doing an explicit DROP
> TABLE foo on all 200 tables. Is there a good recipe for this, an easy
> way to get a listing of all the tables in a db?

If all of the tables are in the public schema, dropping that schema should
cascade to dropping all of the tables.

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

Предыдущее
От: "J. Greenlees"
Дата:
Сообщение: ntfs for windows port rc5-2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem Dropping a Database with users connected to it