0
我想通過sqlalchemy在postgresql中發送NOTIFY。這裏是代碼的一部分:如何在flask-sqlalchemy中的Raw SQL中避免ROLLBACK語句
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
db.engine.execute("NOTIFY DHCP")
產生下面的SQL代碼:
2016-11-29 14:58:41 +05 [20571-16] [email protected] LOG: statement: BEGIN
2016-11-29 14:58:41 +05 [20571-17] [email protected] LOG: statement: NOTIFY DHCP
2016-11-29 14:58:41 +05 [20571-18] [email protected] LOG: statement: ROLLBACK
爲什麼我必須ROLLBACK語句中的代碼和如何更改承諾嗎?