pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: rollback
5+ messages / 4 participants
[nested] [flat]
* rollback
@ 2001-10-26 00:45 Oleg Lebedev <olebedev@waterford.org>
1970-01-01 00:00 ` Re: rollback Haller Christoph <ch@rodos.fzk.de>
0 siblings, 1 reply; 5+ messages in thread
From: Oleg Lebedev @ 2001-10-26 00:45 UTC (permalink / raw)
To: 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.
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?
thanks,
Oleg
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: rollback
2001-10-26 00:45 rollback Oleg Lebedev <olebedev@waterford.org>
@ 1970-01-01 00:00 ` Haller Christoph <ch@rodos.fzk.de>
0 siblings, 0 replies; 5+ messages in thread
From: Haller Christoph @ 1970-01-01 00:00 UTC (permalink / raw)
To: olebedev@waterford.org; +Cc: 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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Rollback
@ 2007-03-17 10:49 Hetal Patel <hetal@banasdairy.coop>
2007-03-17 11:23 ` Re: Rollback Phillip Smith <phillip.smith@weatherbeeta.com.au>
0 siblings, 1 reply; 5+ messages in thread
From: Hetal Patel @ 2007-03-17 10:49 UTC (permalink / raw)
To: pgsql-sql
Hello Friends
New to postgresql
I m in trouble
I fired a query a "DELETE" query from a PGADMIN III postgresql tool
Which have deleted some rows which shud ve not been deleted
How do i get it rollback
I mean i want all the rows back
Please help me
Its urgent
Thanks in advance for Help
Hetal Patel
System Dept.
Banasdairy
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Rollback
2007-03-17 10:49 Rollback Hetal Patel <hetal@banasdairy.coop>
@ 2007-03-17 11:23 ` Phillip Smith <phillip.smith@weatherbeeta.com.au>
2007-03-17 11:59 ` Re: Rollback Hetal Patel <hetal@banasdairy.coop>
0 siblings, 1 reply; 5+ messages in thread
From: Phillip Smith @ 2007-03-17 11:23 UTC (permalink / raw)
To: Hetal Patel <hetal@banasdairy.coop>; +Cc: pgsql-sql
You can not rollback a committed transaction.
Time to restore some backups - what kind of backup are you using?
~p
On Sat, 2007-03-17 at 16:19 +0530, Hetal Patel wrote:
> Hello Friends
> New to postgresql
> I m in trouble
> I fired a query a "DELETE" query from a PGADMIN III postgresql tool
> Which have deleted some rows which shud ve not been deleted
> How do i get it rollback
> I mean i want all the rows back
> Please help me
> Its urgent
> Thanks in advance for Help
>
>
> Hetal Patel
> System Dept.
> Banasdairy
>
*******************Confidentiality and Privilege Notice*******************
The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.
Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Rollback
2007-03-17 10:49 Rollback Hetal Patel <hetal@banasdairy.coop>
2007-03-17 11:23 ` Re: Rollback Phillip Smith <phillip.smith@weatherbeeta.com.au>
@ 2007-03-17 11:59 ` Hetal Patel <hetal@banasdairy.coop>
0 siblings, 0 replies; 5+ messages in thread
From: Hetal Patel @ 2007-03-17 11:59 UTC (permalink / raw)
To: phillip.smith@weatherbeeta.com.au; +Cc: pgsql-sql
Thanks for replyin buddy
I had a partial backup and recovered from that
will take care next time
thanks again
> You can not rollback a committed transaction.
>
> Time to restore some backups - what kind of backup are you using?
>
> ~p
>
> On Sat, 2007-03-17 at 16:19 +0530, Hetal Patel wrote:
>
>> Hello Friends
>> New to postgresql
>> I m in trouble
>> I fired a query a "DELETE" query from a PGADMIN III postgresql tool
>> Which have deleted some rows which shud ve not been deleted
>> How do i get it rollback
>> I mean i want all the rows back
>> Please help me
>> Its urgent
>> Thanks in advance for Help
>>
>>
>> Hetal Patel
>> System Dept.
>> Banasdairy
>>
>
>
> *******************Confidentiality and Privilege Notice*******************
>
> The material contained in this message is privileged and confidential to
> the addressee. If you are not the addressee indicated in this message or
> responsible for delivery of the message to such person, you may not copy
> or deliver this message to anyone, and you should destroy it and kindly
> notify the sender by reply email.
>
> Information in this message that does not relate to the official business
> of Weatherbeeta must be treated as neither given nor endorsed by
> Weatherbeeta.
> Weatherbeeta, its employees, contractors or associates shall not be liable
> for direct, indirect or consequential loss arising from transmission of
> this
> message or any attachments
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
Hetal Patel
System Dept.
Banasdairy
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2007-03-17 11:59 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 00:45 rollback Oleg Lebedev <olebedev@waterford.org>
1970-01-01 00:00 ` Haller Christoph <ch@rodos.fzk.de>
2007-03-17 10:49 Rollback Hetal Patel <hetal@banasdairy.coop>
2007-03-17 11:23 ` Re: Rollback Phillip Smith <phillip.smith@weatherbeeta.com.au>
2007-03-17 11:59 ` Re: Rollback Hetal Patel <hetal@banasdairy.coop>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox