如何在Greenplum数据库上使用psycopg2获取最后插入行的ID?
以下是我已经尝试过的几件不起作用的事情.
提前致谢.
正如您在下面看到的,我在Linux(RHEL)上运行Python 2.6,但由于某种原因它没有os.O_EXLOCK.有什么理由吗?有没有办法解决这个问题?
Python 2.6.5 (r265:79063, Apr 9 2010, 11:16:46)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.O_EXLOCK
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'O_EXLOCK'
>>> os.O_DSYNC
4096
>>>
Run Code Online (Sandbox Code Playgroud)