我试着对我的postgres数据库运行SQL
我通过的连接对象
import psycopg2
conn_string = "host='localhost' port='5432' dbname='postgres' user='postgres' password='mysecretpassword'"
conn = psycopg2.connect(conn_string)
似乎没问题
^{pr2}$
结果是非类型的,所以一定是出了什么问题?在
我做错了什么?我如何调试这个?在
Tags:
cursor.execute()
只执行查询,不提取任何数据。为了接收数据,您需要调用cursor.fetchall()
或cursor.fetchone()
。在相关问题 更多 >
编程相关推荐