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
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
According to this Dustin Marx article, you can use:
\echo :AUTOCOMMIT
If it's desired to "always" have autocommit disabled, the \set AUTOCOMMIT off meta-command can be added to one's local ~/.psqlrc file. For an even more global setting, this meta-command can be placed in apsqlrc file in the database's system config directory (which can be located using PostgreSQL operating system-level command pg_config --sysconfdir).