Select does not return values Postgres-11.4

前端 未结 2 928
[愿得一人]
[愿得一人] 2021-02-05 10:07

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.

SEL         


        
相关标签:
2条回答
  • 2021-02-05 10:45

    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.

    0 讨论(0)
  • 2021-02-05 10:59

    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 pgadmin4@pgadmin.org


    Trying to give a properly answer

    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:

    1. login as postgres user: sudo su postgres
    2. psql -h dbhostname -U dbusername -d dbname
    3. SELECT * FROM dbtable;

    =)

    0 讨论(0)
提交回复
热议问题