search

Home  >  Q&A  >  body text

python - 数据库能不能撤消操作?不小心执行了一个update没有带where。。

postgresql + navicat
想更新表a的某一行数据,结果忘加where条件了。
结果就是全部行都被update成了相同数据

这样还有救么?有撤销这次操作的方法吗??

晕死了。。

怪我咯怪我咯2825 days ago1009

reply all(5)I'll reply

  • PHPz

    PHPz2017-04-18 09:07:17

    The default log path is generally in /var/lib/pgsql/9.5/data/pg_log, and the default log level is ddl. Please find it quickly.

    reply
    0
  • PHPz

    PHPz2017-04-18 09:07:17

    Learn your lesson.

    The database prohibits destructive operations such as DELETE and UPDATE, and uses CREATE, INSERT, RENAME, version control, etc. instead.

    reply
    0
  • 阿神

    阿神2017-04-18 09:07:17

    Yes, pgsql should have the ability to write statement logs, just roll back. If mysql has it, pgsql should also have it

    reply
    0
  • 黄舟

    黄舟2017-04-18 09:07:17

    Unless you have a backup. .

    reply
    0
  • 阿神

    阿神2017-04-18 09:07:17

    Log recovery. Log recovery. Log recovery. Log recovery. Log recovery. Log recovery.

    reply
    0
  • Cancelreply