postgresql 默认是会自动提交的。 psql.exe -h 192.168.1.2 -U username -d testdb -p 5432 (最后的5432是端口号) testdb=# \set AUTOCOMMIT off