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
This happens with PostgreSQL 11.4.
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
This happens with PostgreSQL 11.4.
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
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.
Same thing with python3.7 (just change the lib path)
Hope this helps.
psycopg2 didn't work for me since it required pg_config which I couldn't find. Instead I did: pip3 install psycopg2-binary which succeeded without asking any config. Then, I modified proposed above pgadmin4.conf file by setting PythonPath in the following way: PythonPath="/home/rustam/.local/lib/python3.6;/home/rustam/.local/lib/python3.6/site-packages" . After that my SELECT queries stopped returning table_oid and I can see results fine.: instead of ; PythonPath="/home/rustam/.local/lib/python3.6:/home/rustam/.local/lib/python3.6/site-packages"sudo pip3 install -U psycopg2 didn't work install pip3 by sudo apt install python-pip and then run sudo pip3 install -U psycopg2 again. running pip3 install -U psycopg2 to me didn't solve the problem, I have to install pip3 in sudo and run sudo pip3 install -U psycopg2 and then don't forget to update the pgadmin4 confPythonPath=/usr/local/lib/python3.6/dist-packages in the pgadmin4.conf, and restarted the pgadmin server process.after I updated my pgAdmin 4 today I'm getting the same message 'table_oid' from select queries I execute in pgAdmin 4.
The odd thing is when I execute the view data command from GUI it works perfectly.
When I execute a select search from query tool I got the 'table_oid' message, as same as Maykon Morais.
I tried to add a comment on Maykon Morais' question (telling I got the same problem) but i don't have enough reputation yet :-\
The table_oid message appear, in my case, when running a simple select from the query tool window of pgadmin4.
Postgres version: psql (PostgreSQL) 11.4 (Ubuntu 11.4-1.pgdg18.04+1)
pgAdmin4 version: Versión 4.11 Derechos de Autor Copyright (C) 2013 - 2019, The pgAdmin Development Team Versión de Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] Versión de Flask 0.12.2 Modo de Aplicación Escritorio Usuario Actual [email protected]
Well the workaround that I see (and I'm using myself right now) meanwhile this situation is fixed, securely soon, is to execute select queries via console:
=)