How to check if autocommit is on or not postgres' psql

前端 未结 2 1172
星月不相逢
星月不相逢 2021-02-05 20:20

I am using postgres 9.5. How can I check if auto commit is on or off? I tried SHOW AUTOCOMMIT where I got ERROR: unrecognized configuration parameter \"autoco

2条回答
  •  被撕碎了的回忆
    2021-02-05 20:42

    One quick and dirty way is to just execute commit; and look for the below message to infer auto-commit is on or not.

    Error report - SQL Error: Cannot commit when autoCommit is enabled.

    Note: I used SQL developer so not sure about other IDEs

提交回复
热议问题