Postgres setting autocommit off globally

前端 未结 2 947
孤独总比滥情好
孤独总比滥情好 2021-01-18 02:08

How do you set autocommit off in psql 8.4 at a global level? is there a configuration attribute that i can change that will introduce this behaviour for all dbs on a cluster

2条回答
  •  自闭症患者
    2021-01-18 02:43

    Use a transaction if you want want a (open) transaction:

    BEGIN;
      INSERT ...;
      UPDATE ...;
    COMMIT; -- when you're done
    

提交回复
热议问题