选择不返回值Postgres-11.4 [英] Select does not return values Postgres-11.4
问题描述
我正在使用pgAdmin-4并创建了一个具有单个表的数据库,但是select返回一条错误消息:'table oid'
I am using pgAdmin-4 and created a database with a single table, but select returns an error message: 'table oid'
我正在使用普通表选择查询。
I'm using a normal select query.
SELECT * FROM escola
这是在PostgreSQL 11.4上发生的。
This happens with PostgreSQL 11.4.
推荐答案
问题出在python3-psycopg2。最新的pgadmin4版本需要psycopg2-2.8。但是,如果您使用的是Debian / Ubuntu稳定版,请安装apt v2.7。
因此,您需要使用pip更新它:
The problem is due to python3-psycopg2. The latest pgadmin4 version requires psycopg2-2.8. But if you're on Debian/Ubuntu stable, apt installed v2.7. So you need to update it with pip :
sudo pip3 install -U psycopg2
然后更新pgadmin4配置以添加本地python路径:
Then update the pgadmin4 config to add the local python path:
nano ~/.config/pgadmin/pgadmin4.conf
# or with a right click on the system tray icon
# add /usr/local/lib/python3.6/dist-packages to the PythonPath.
与python3.7相同(只是更改lib路径)
Same thing with python3.7 (just change the lib path)
希望这会有所帮助。
这篇关于选择不返回值Postgres-11.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!