Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)

From: Tony Bazeley <tonyb(at)tonyb(dot)id(dot)au>
To: pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)
Date: 2019-08-18 01:57:06
Message-ID: d21ec1e8-6d02-e146-3647-1f3fede19377@tonyb.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Thanks for the quick upgrade to fix
this problem.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I ran the upgrade to 4.11.2 through the
package manager.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">But commands of the form select * from
tablename now return: not enough values to unpack (expected 5, got
4)</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I noticed the  the splash and about
screens still referred to version 4.11 so did a complete
reinstall:<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">sudo apt --purge remove pgadmin4<br>
sudo apt autoremove</div>
<div class="moz-cite-prefix">and sudo apt-get install pgadmin4</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">and now have: <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">sudo apt list --installed | grep pga<br>
pgadmin4-common/disco-pgdg,now 4.11-2.pgdg19.04+1 all
[installed,automatic]<br>
pgadmin4-doc/disco-pgdg,now 4.11-2.pgdg19.04+1 all
[installed,automatic]<br>
pgadmin4/disco-pgdg,now 4.11-2.pgdg19.04+1 amd64 [installed]<br>
<br>
</div>
<div class="moz-cite-prefix">However the problem still persists</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I notice<a moz-do-not-send="true"
href="https://stackoverflow.com/questions/57470715/pgadmin4-query-error-not-enough-values-to-unpack-expected-5-got-4/57482785#57482785">
stackoverflow has some recent advice on actions for the desktop
version</a> but I'm not sure how to proceed with the server
version<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"> On 11/8/19 8:28 am, Tony Bazeley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:634b9b6f-6014-9309-9419-abc5da4323e3(at)sa(dot)apana(dot)org(dot)au">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">
<div class="moz-cite-prefix">I'm no python programmer and have
installed 4.11 under Kubuntu 19.04</div>
<p>My python version is:<br>
~$ python3 -V<br>
Python 3.7.3</p>
<div class="moz-cite-prefix">I installed psycopg2<br>
~$ sudo pip3 install -U psycopg2</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">And have a psycopg2 set of files in
what seems to be an appropriate spot</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">~$ ls -l
/usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2<br>
total 152<br>
-rw-r--r-- 1 root root 68788 Jul 23 14:45 connection.py<br>
-rw-r--r-- 1 root root  7750 Jul 23 14:45 cursor.py<br>
-rw-r--r-- 1 root root  3549 Jul 23 14:45 encoding.py<br>
-rw-r--r-- 1 root root  2259 Jul 23 14:45 generate_keywords.py<br>
-rw-r--r-- 1 root root 12706 Jul 23 14:45 __init__.py<br>
-rw-r--r-- 1 root root  9375 Jul 23 14:45 keywords.py<br>
drwxr-xr-x 2 root root  4096 Aug 11 00:02 __pycache__<br>
-rw-r--r-- 1 root root 20569 Jul 23 14:45 server_manager.py<br>
-rw-r--r-- 1 root root  8416 Jul 23 14:45 typecast.py<br>
<br>
</div>
<div class="moz-cite-prefix">But the problem persists</div>
<div class="moz-cite-prefix">Using the
tablename&gt;view/edit/data facility works, but using the same
sql in the Query Tool returns 'table_oid'</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Any thoughts on what to do next
would be greatly appreciated</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Tony</div>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 28/7/19 6:27 pm, Dave Page wrote:<br>
</div>
<blockquote type="cite"
cite="mid:EDB52702-764D-4219-AA56-AD334862122C(at)pgadmin(dot)org">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<br>
<div dir="ltr"><br>
On 27 Jul 2019, at 21:14, richard coleman &lt;<a
href="mailto:rcoleman(dot)ascentgl(at)gmail(dot)com"
moz-do-not-send="true">rcoleman(dot)ascentgl(at)gmail(dot)com</a>&gt;
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div>'ello all, </div>
<div><br>
</div>
<div>When running the following query:</div>
<blockquote style="margin:0 0 0
40px;border:none;padding:0px">
<div>SELECT * FROM live.tbl_documents limit 10000;</div>
</blockquote>
<div>in pgAdmin4 it returns <b>no</b> output and switches
to the Messages tab with the following message:</div>
<blockquote style="margin:0 0 0
40px;border:none;padding:0px">
<div>'table_oid'</div>
</blockquote>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Upgrade psycopg2 to 2.8.3. pgAdmin has required 2.8.x for
some time.</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>The same query against the same table in the same
database run at the psql prompt returns the records as
expected.</div>
<div><br>
</div>
<div>postgreSQL 10.3</div>
<div><br>
</div>
using pgAdmin4
<div>Version<br>
4.11<br>
Copyright<br>
Copyright (C) 2013 - 2019, The pgAdmin Development Team<br>
Python Version<br>
3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1
20180414 (experimental) [trunk revision 259383]]<br>
Flask Version<br>
0.12.2<br>
Application Mode<br>
Desktop<br>
Current User<br>
<a href="mailto:pgadmin4(at)pgadmin(dot)org"
moz-do-not-send="true">pgadmin4(at)pgadmin(dot)org</a><br>
</div>
<div><br>
</div>
<div>Running on Chromium </div>
<div>Version 75.0.3770.90 (Official Build) Built on Ubuntu
, running on Ubuntu 18.04 (64-bit)</div>
<div><br>
</div>
<div>Kubuntu 18.04.</div>
<div><br>
</div>
<div>Table:<br>
CREATE TABLE live.tbl_documents<br>
(<br>
    id character varying(50) COLLATE
pg_catalog."default" NOT NULL,<br>
    company_no character varying(32) COLLATE
pg_catalog."default",<br>
    tariff_id integer,<br>
    scac character(4) COLLATE pg_catalog."default",<br>
    type character varying(50) COLLATE
pg_catalog."default" NOT NULL,<br>
    name character varying(200) COLLATE
pg_catalog."default" NOT NULL,<br>
    filelocation character varying(200) COLLATE
pg_catalog."default" NOT NULL,<br>
    description character varying(200) COLLATE
pg_catalog."default" NOT NULL,<br>
    archive boolean NOT NULL DEFAULT false,<br>
    par_id character varying(50) COLLATE
pg_catalog."default",<br>
    category character varying(250) COLLATE
pg_catalog."default",<br>
    visible_in_vision boolean NOT NULL DEFAULT false,<br>
    tariffrequest_id character varying(50) COLLATE
pg_catalog."default",<br>
    entered_on timestamp without time zone NOT NULL
DEFAULT now(),<br>
    invoice_id character varying(40) COLLATE
pg_catalog."default",<br>
    lastwritetime timestamp without time zone,<br>
    shipment_id character varying(40) COLLATE
pg_catalog."default",<br>
    CONSTRAINT tbl_documents_pkey PRIMARY KEY (id),<br>
    CONSTRAINT tbl_documents_par_id_fkey FOREIGN KEY
(par_id)<br>
        REFERENCES live.tbl_pars (par_id) MATCH SIMPLE<br>
        ON UPDATE NO ACTION<br>
        ON DELETE NO ACTION<br>
)<br>
WITH (<br>
    OIDS = FALSE<br>
)<br>
TABLESPACE pg_default;<br>
</div>
<div><br>
</div>
</div>
</div>
</blockquote>
</blockquote>
<p><br>
</p>
</blockquote>
<p><br>
</p>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 9.6 KB

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Aditya Toshniwal 2019-08-19 05:35:04 Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)
Previous Message Charalampos Fanoulis 2019-08-17 08:38:59 Cannot log in to pgadmin interface with Docker