在将应用程序移植到PostgreSQL (9.1)时,我发现一个奇怪的SQL不兼容性与round()函数有关,特别是使用第二个参数表示舍入精度的版本。在Postgres中,它使用ERROR: function round(double precision, integer) does not exist错误,并建议使用HINT: No function在搜索过程中,我发现了两个解决这个问题的方法。这当然有效,但我不喜欢它(我的背景是Oracle,它甚至没有真正的浮点
DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.