Postgresql “no transaction in progress”
为什么我在
1 2 3 4 5 6 7 8 9 10 | 2014-07-04 21:47:19 EST LOG: statement: START TRANSACTION; 2014-07-04 21:47:19 EST LOG: statement: SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; 2014-07-04 21:47:19 EST LOG: statement: SET autocommit = 1; 2014-07-04 21:47:19 EST LOG: statement: SET TIME ZONE 'UTC' 2014-07-04 21:47:19 EST LOG: statement: INSERT INTO"Users" (...) VALUES (...) RETURNING *; 2014-07-04 21:47:19 EST LOG: statement: INSERT INTO"Profiles" (...) RETURNING *; 2014-07-04 21:47:19 EST LOG: statement: SET TIME ZONE 'UTC' 2014-07-04 21:47:19 EST LOG: statement: INSERT INTO"Sessions" (...) VALUES (...) RETURNING *; 2014-07-04 21:47:20 EST LOG: statement: COMMIT; 2014-07-04 21:47:20 EST WARNING: there IS no TRANSACTION IN progress |
您正在使用自动提交。 使用自动提交时,显式启动事务是没有意义的。
删除"set autocommit = 1"行或将1更改为"off"或等效值,这应该有效。