Search code examples
postgresqlpgadmin-4

Select does not return values Postgres-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.


Solution

  • 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.