Re: canceling a delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 19, 2016 at 2:44 PM, Campbell, Lance <lance@xxxxxxxxxxxx> wrote:

PostgreSQL 9.5.x

 

I logged onto PostgreSQL.  I did a command:

 

Delete from some_table;

 

I realized that I should have had a where clause.  So I canceled the delete with CTRL-C.  PostgreSQL said to canceled the delete.

 

Did PostgreSQL delete any records? 

 


​Mostly what Kevin said - though the first thing you should consider doing next time is "BEGIN;"

A single statement either succeeds or fails atomically - so either it deleted ALL records or none.

Once within a transaction you get to change your mind up until you issue a "COMMIT;"

David J.


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux