Re: patch for RM2243 and RM2244 [pgAdmin4]

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: patch for RM2243 and RM2244 [pgAdmin4]
Date: 2017-03-21 16:40:36
Message-ID: CA+OCxoyFZO70KRQC_WM=LMuz2QiCiyZuRDbtYFJzvPmLCC2WPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Tue, Mar 21, 2017 at 12:35 PM, Harshal Dhumal
<harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
> Hi,
>
> Please find updated patch for RM2244.
>
> Changes: View Data was broken in last patch when table contains more that 1
> column.
>
>
> --
> Harshal Dhumal
> Software Engineer
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, Mar 20, 2017 at 4:10 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>> Hi
>>
>> On Sat, Mar 18, 2017 at 2:57 PM, Harshal Dhumal
>> <harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
>> >
>> > Please find attached patch for RM2244.
>>
>> If I run View Data on the table below, I see the following exception
>> and no grid is rendered:
>>
>> CREATE TABLE public.varchar_test
>> (
>> id integer NOT NULL DEFAULT nextval('varchar_test_id_seq'::regclass),
>> data character varying(10) COLLATE pg_catalog."default",
>> CONSTRAINT varchar_test_pkey PRIMARY KEY (id)
>> )
>> WITH (
>> OIDS = FALSE
>> )
>> TABLESPACE pg_default;
>>
>> ALTER TABLE public.varchar_test
>> OWNER to postgres;
>>
>>
>>
>>
>> 2017-03-20 10:37:49,711: SQL pgadmin: Execute (async) for server #1 -
>> CONN:1470698 (Query-id: 4557394):
>> SELECT * FROM public.varchar_test
>> ORDER BY id ASC
>> 2017-03-20 10:37:49,714: INFO werkzeug: 127.0.0.1 - - [20/Mar/2017
>> 10:37:49] "GET /sqleditor/view_data/start/2408862 HTTP/1.1" 200 -
>> 2017-03-20 10:37:49,749: SQL pgadmin: Polling result for (Query-id:
>> 4557394)
>> 2017-03-20 10:37:49,749: SQL pgadmin: Status message for (Query-id:
>> 4557394)
>> 2017-03-20 10:37:49,750: INFO werkzeug: 127.0.0.1 - - [20/Mar/2017
>> 10:37:49] "GET /sqleditor/poll/2408862 HTTP/1.1" 200 -
>> 2017-03-20 10:37:49,779: INFO werkzeug: 127.0.0.1 - - [20/Mar/2017
>> 10:37:49] "GET /sqleditor/columns/2408862 HTTP/1.1" 200 -
>> 2017-03-20 10:37:49,808: SQL pgadmin: Execute (dict) for server #1 -
>> CONN:1470698 (Query-id: 9451779):
>> SELECT oid, format_type(oid,null) as typname FROM pg_type WHERE oid IN
>> (%s) ORDER BY oid;
>>
>> 2017-03-20 10:37:49,814: INFO werkzeug: 127.0.0.1 - - [20/Mar/2017
>> 10:37:49] "GET /sqleditor/fetch/types/2408862 HTTP/1.1" 500 -
>> Traceback (most recent call last):
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 2000, in __call__
>> return self.wsgi_app(environ, start_response)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1991, in wsgi_app
>> response = self.make_response(self.handle_exception(e))
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1567, in handle_exception
>> reraise(exc_type, exc_value, tb)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1988, in wsgi_app
>> response = self.full_dispatch_request()
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1641, in full_dispatch_request
>> rv = self.handle_user_exception(e)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1544, in handle_user_exception
>> reraise(exc_type, exc_value, tb)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1639, in full_dispatch_request
>> rv = self.dispatch_request()
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1625, in dispatch_request
>> return self.view_functions[rule.endpoint](**req.view_args)
>> File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py",
>> line 792, in decorated_view
>> return func(*args, **kwargs)
>> File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py",
>> line 558, in fetch_pg_types
>> """, tuple(oid))
>> File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 938, in execute_dict
>> self.__internal_blocking_execute(cur, query, params)
>> File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
>> line 595, in __internal_blocking_execute
>> cur.execute(query, params)
>> File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/cursor.py",
>> line 176, in execute
>> return _cursor.execute(self, query, params)
>> TypeError: not all arguments converted during string formatting
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2017-03-21 17:28:17 pgAdmin 4 commit: [Extendible][Dashboard] Allow to create a server clic
Previous Message Dave Page 2017-03-21 16:40:25 pgAdmin 4 commit: PRevent an error being displayed if the user views da