Re: rollback

Поиск
Список
Период
Сортировка
От Haller Christoph
Тема Re: rollback
Дата
Msg-id 200110261226.OAA02963@rodos
обсуждение исходный текст
Ответ на rollback  (Oleg Lebedev <olebedev@waterford.org>)
Список pgsql-sql
> Hi everybody,
> I was playing with psql and accidently deleted a couple of records from
> my database. I am wondering if there is any way to restore them. I know
> that in Oracle you can do 'rollback work' from SQLPlus interface and it
> would rollback all the updates done to the database. 
That's available in PostgreSQL too. 
But, by entering psql autocommit is on by default, meaning every sql 
command is committed at once. 
To enable a rollback in psql you have to enter a transaction explicitly 
by using BEGIN; 
Everything done below BEGIN can be rolled back. 
Try. 

> I am pretty sure that from now on I would try to revoke permissions to
> delete anything from the database from users like myself. What is the
> best way to do this?
Refer to the sql commands GRANT and REVOKE within the documentation. 
Additionally, you should check the CREATE GROUP command. 
Creating groups of users is a very elegant way to grant/revoke 
permissions on objects. 
As far as I know there is no way to revoke delete permissions 
on the database as whole, you have to list all tables you want to 
have delete permissions dropped. 
Regards, Christoph 


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

Предыдущее
От: "Dmitry G. Mastrukov" Дмитрий Геннадьевич Мастрюков
Дата:
Сообщение: Re: GUID in postgres
Следующее
От: Horst Herb
Дата:
Сообщение: Re: Diferent databases on same query...