Обсуждение: Reg : Data base deletion

Поиск
Список
Период
Сортировка

Reg : Data base deletion

От
"Pradeepa"
Дата:
Hi Team,

We want some information like, if any one deletes database from postgres,
how to trace when it has been deleted. The deletion is not from any command
but by right clicking on db and deleting it.



Plz help us as..



Regards,

Pradeepa.

Re: Reg : Data base deletion

От
Bill Moran
Дата:
In response to "Pradeepa" <pradeepa.ili@valtech.co.in>:
>
> We want some information like, if any one deletes database from postgres,
> how to trace when it has been deleted.

The easiest way that I know of is to enable logging of DDL statements in
postgresql.conf.  Make sure you have enough disk space to handle all
the log data that results.

> The deletion is not from any command
> but by right clicking on db and deleting it.

It doesn't matter.  Whatever GUI you're using to do this will simply
convert your clicking into SQL commands, so it's really the same
thing from the server's perspective.

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023

Re: Reg : Data base deletion

От
Andrew Sullivan
Дата:
On Wed, Jun 25, 2008 at 01:24:06PM +0530, Pradeepa wrote:
> Hi Team,
>
> We want some information like, if any one deletes database from postgres,
> how to trace when it has been deleted. The deletion is not from any command
> but by right clicking on db and deleting it.

Uh, how is that "right clicking" happening?  What interface are you
using?  The delete is happening by _some_ command.

Anyway, you can do this with triggers.  There's an example of doing
this in the manual, I believe.

A
--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/