jaundavid
jaundavid

Reputation: 385

What is the behavior of cancel query on pgadmin3

I was irresponsibly typing SQL on a production ambient using pgadmin3 tool, suddenly I mistyped and execute a UPDATE sentence on a biggerImportantTable without WHERE. Then desperately I use cancel query button on pgadmin3. After I look at a small sample of the rows in the table and it seems good. But I'm not sure of the database integrity. What is the state of my boss database?.

The log of pgadmin3:

-- Executing query:

UPDATE schema.big_important_table SET important_field = NULL;
********** Error **********

ERROR: canceling statement due to user request
SQL state: 57014

Upvotes: 0

Views: 539

Answers (1)

user330315
user330315

Reputation:

If you cancel a DML statement (even with auto-commit enabled as pgAdmin does) the whole statement is rolled back.

So everything should be OK, nothing was changed.

Upvotes: 1

Related Questions