【发布时间】:2019-09-14 06:49:01
【问题描述】:
我是 Python 新手,想使用 python psycopg2 API 从 postgreSQL 数据库中选择一些数据。
我选择的表在模式 dl(dl.products) 中,所以当我编写代码时
Conn= psycopg2.connect(host="localhost",database="postgres",user="postgres", password="postgres")
Cur=conn.cursor()
Cur.execute("select * from dl.products")
显示错误relation dl.products 不存在。
谁能告诉我如何做到这一点的例子?
【问题讨论】:
标签: python python-3.x postgresql python-2.7 psycopg2